forked from qt-creator/qt-creator
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:
@@ -358,7 +358,9 @@ namespace ADS
|
|||||||
saveStartupWorkspace();
|
saveStartupWorkspace();
|
||||||
|
|
||||||
for (auto floatingWidget : d->m_floatingWidgets) {
|
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();
|
delete floatingWidget.data();
|
||||||
}
|
}
|
||||||
d->m_floatingWidgets.clear();
|
d->m_floatingWidgets.clear();
|
||||||
|
Reference in New Issue
Block a user