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)
116116 return ;
117117 }
118118
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+
120126 if (Window)
121127 {
122128 Window->setProperty (" FocusedDockWidget" , QVariant::fromValue<CDockWidget*>(DockWidget));
@@ -145,7 +151,14 @@ void DockFocusControllerPrivate::updateDockWidgetFocus(CDockWidget* DockWidget)
145151 }
146152
147153
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+
149162 if (NewFloatingWidget)
150163 {
151164 NewFloatingWidget->setProperty (" FocusedDockWidget" , QVariant::fromValue (DockWidget));
You can’t perform that action at this time.
0 commit comments