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(window->handle()); - xcbWin->maybeSetScreen(this); + if (xcbWin) + xcbWin->maybeSetScreen(this); } }