fix crash when using widgets that delete on close
This commit is contained in:
@@ -1054,9 +1054,10 @@ bool DockContainerWidgetPrivate::restoreAutoHideDockArea(CDockingStateReader& s,
|
||||
}
|
||||
|
||||
CDockAreaWidget* DockArea = nullptr;
|
||||
CAutoHideDockContainer* dockContainer = nullptr;
|
||||
if (!Testing)
|
||||
{
|
||||
const auto dockContainer = new CAutoHideDockContainer(DockManager, area, _this);
|
||||
dockContainer = new CAutoHideDockContainer(DockManager, area, _this);
|
||||
if (!dockContainer->restoreState(s, Testing))
|
||||
{
|
||||
return false;
|
||||
@@ -1108,6 +1109,11 @@ bool DockContainerWidgetPrivate::restoreAutoHideDockArea(CDockingStateReader& s,
|
||||
DockArea->autoHideDockContainer()->toggleView(!Closed);
|
||||
}
|
||||
|
||||
if (dockContainer && !dockContainer->dockWidget())
|
||||
{
|
||||
dockContainer->cleanupAndDelete();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user