From 87713e76d4b464c2997d736e7b705e976fb5e69d 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 1d4515c92..0d4ead473 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; }