diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index f52e12c6a8..af3b27fd10 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1697,7 +1697,7 @@ void QWindow::setScreen(QScreen *newScreen) void QWindow::screenDestroyed(QObject *object) { Q_D(QWindow); - if (d->parentWindow) + if (d->parentWindow || QGuiApplication::closingDown()) return; if (object == static_cast(d->topLevelScreen)) { const bool wasVisible = isVisible();