AdvancedDockingSystem: Fix crash on shutdown

In some cases the last floatingWidget seems to be
partially destructed. Checking for the parent checks for
this case.

Change-Id: I27cb750d846e71b9ab4423700120e2c659a02adc
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2021-01-08 14:00:36 +01:00
parent 41ff60a693
commit e2c808f576

View File

@@ -358,7 +358,9 @@ namespace ADS
saveStartupWorkspace();
for (auto floatingWidget : d->m_floatingWidgets) {
if (floatingWidget)
/* There have been crashes with partially destructed widgets in
m_floatingWidgets. Those do not have a parent. */
if (floatingWidget && floatingWidget->parent() == this)
delete floatingWidget.data();
}
d->m_floatingWidgets.clear();