Avoid a crash in QDockAreaLayoutInfo::apply caused by layout info recursively replaced while the method is still working on it. --- diff --git a/src/widgets/widgets/qmainwindowlayout.cpp b/src/widgets/widgets/qmainwindowlayout.cpp index fc0bb07e..17c5e0f0 100644 --- a/src/widgets/widgets/qmainwindowlayout.cpp +++ b/src/widgets/widgets/qmainwindowlayout.cpp @@ -2019,6 +2019,10 @@ void QMainWindowLayout::setGeometry(const QRect &_r) if (savedState.isValid()) return; + if (restoredState && isInApplyState) + // avoid to replace the state again that is currently used in applyState + return; + QRect r = _r; QLayout::setGeometry(r);