From b8579d8c24969d36a009c54bd4ed7335f034fde3 Mon Sep 17 00:00:00 2001 From: Rodrigo Oliva Date: Tue, 19 Oct 2021 16:33:30 +0200 Subject: [PATCH] Fix crash when adding closed dock widgets to the manager. --- src/DockWidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DockWidget.cpp b/src/DockWidget.cpp index 42641ee9d..1d4515c92 100644 --- a/src/DockWidget.cpp +++ b/src/DockWidget.cpp @@ -597,7 +597,8 @@ void CDockWidget::toggleViewInternal(bool Open) CDockWidget* TopLevelDockWidgetAfter = DockContainer ? DockContainer->topLevelDockWidget() : nullptr; CDockWidget::emitTopLevelEventForWidget(TopLevelDockWidgetAfter, true); - CFloatingDockContainer* FloatingContainer = DockContainer->floatingWidget(); + CFloatingDockContainer* FloatingContainer = DockContainer + ? DockContainer->floatingWidget() : nullptr; if (FloatingContainer) { FloatingContainer->updateWindowTitle();