From d5fefaa35fb53e299b7f39b0d8f541954c710d94 Mon Sep 17 00:00:00 2001 From: kzl <17166779@qq.com> Date: Sat, 19 Feb 2022 02:33:55 +0800 Subject: [PATCH] while dockManager.removeDockWidget , the dockManager() returns null (#399) --- src/DockWidget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/DockWidget.cpp b/src/DockWidget.cpp index 1d4515c..0d4ead4 100644 --- a/src/DockWidget.cpp +++ b/src/DockWidget.cpp @@ -893,7 +893,10 @@ void CDockWidget::setFloating() //============================================================================ void CDockWidget::deleteDockWidget() { - dockManager()->removeDockWidget(this); + auto manager=dockManager(); + if(manager){ + manager->removeDockWidget(this); + } deleteLater(); d->Closed = true; }