File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,13 @@ void DockFocusControllerPrivate::updateDockWidgetFocus(CDockWidget* DockWidget)
116
116
return ;
117
117
}
118
118
119
- auto Window = DockWidget->dockContainer ()->window ()->windowHandle ();
119
+ QWindow* Window = nullptr ;
120
+ auto DockContainer = DockWidget->dockContainer ();
121
+ if (DockContainer)
122
+ {
123
+ Window = DockContainer->window ()->windowHandle ();
124
+ }
125
+
120
126
if (Window)
121
127
{
122
128
Window->setProperty (" FocusedDockWidget" , QVariant::fromValue<CDockWidget*>(DockWidget));
@@ -145,7 +151,14 @@ void DockFocusControllerPrivate::updateDockWidgetFocus(CDockWidget* DockWidget)
145
151
}
146
152
147
153
148
- auto NewFloatingWidget = FocusedDockWidget->dockContainer ()->floatingWidget ();
154
+
155
+ CFloatingDockContainer* NewFloatingWidget = nullptr ;
156
+ DockContainer = FocusedDockWidget->dockContainer ();
157
+ if (DockContainer)
158
+ {
159
+ NewFloatingWidget = DockContainer->floatingWidget ();
160
+ }
161
+
149
162
if (NewFloatingWidget)
150
163
{
151
164
NewFloatingWidget->setProperty (" FocusedDockWidget" , QVariant::fromValue (DockWidget));
You can’t perform that action at this time.
0 commit comments