fix crash when adding auto hide dock container without a previous dock area

This commit is contained in:
Syarif Fakhri 2022-10-28 14:19:12 +08:00
parent 85d7b3047c
commit 85da93c2fe

View File

@ -294,7 +294,7 @@ void CAutoHideDockContainer::addDockWidget(CDockWidget* DockWidget)
// Prevent overriding of d->Size parameter when this function is called during // Prevent overriding of d->Size parameter when this function is called during
// state restoring // state restoring
if (!DockWidget->dockManager()->isRestoringState()) if (!DockWidget->dockManager()->isRestoringState() && OldDockArea)
{ {
// The initial size should be a little bit bigger than the original dock // The initial size should be a little bit bigger than the original dock
// area size to prevent that the resize handle of this auto hid dock area // area size to prevent that the resize handle of this auto hid dock area