Fix crash when adding closed dock widgets to the manager. (#366)

Co-authored-by: Rodrigo Oliva <Rodrigo.Oliva@king.com>
This commit is contained in:
Rodrigo Oliva 2021-10-20 16:54:47 +02:00 committed by GitHub
parent de05ddd203
commit 31e26c2c1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -597,7 +597,8 @@ void CDockWidget::toggleViewInternal(bool Open)
CDockWidget* TopLevelDockWidgetAfter = DockContainer CDockWidget* TopLevelDockWidgetAfter = DockContainer
? DockContainer->topLevelDockWidget() : nullptr; ? DockContainer->topLevelDockWidget() : nullptr;
CDockWidget::emitTopLevelEventForWidget(TopLevelDockWidgetAfter, true); CDockWidget::emitTopLevelEventForWidget(TopLevelDockWidgetAfter, true);
CFloatingDockContainer* FloatingContainer = DockContainer->floatingWidget(); CFloatingDockContainer* FloatingContainer = DockContainer
? DockContainer->floatingWidget() : nullptr;
if (FloatingContainer) if (FloatingContainer)
{ {
FloatingContainer->updateWindowTitle(); FloatingContainer->updateWindowTitle();