summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index 58a364848a..78ced43af8 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -399,7 +399,8 @@ void QXcbScreen::handleScreenChange(xcb_randr_screen_change_notify_event_t *chan
// They need to be told the screen is back, it's OK to render.
foreach (QWindow *window, QGuiApplication::topLevelWindows()) {
QXcbWindow *xcbWin = static_cast<QXcbWindow*>(window->handle());
- xcbWin->maybeSetScreen(this);
+ if (xcbWin)
+ xcbWin->maybeSetScreen(this);
}
}