diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index c2a698ef9b9..069764e5452 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -64,6 +64,11 @@ QWindow::QWindow(QScreen *targetScreen) d->screen = targetScreen; if (!d->screen) d->screen = QGuiApplication::primaryScreen(); + + //if your applications aborts here, then chances are your creating a QWindow before the + //screen list is populated. + Q_ASSERT(d->screen); + QGuiApplicationPrivate::window_list.prepend(this); }