diff --git a/ksplash/ksplashqml/splashapp.cpp b/ksplash/ksplashqml/splashapp.cpp index 947d6a54e..48ab32e7e 100644 --- a/ksplash/ksplashqml/splashapp.cpp +++ b/ksplash/ksplashqml/splashapp.cpp @@ -118,6 +118,9 @@ void SplashApp::setStage(int stage) void SplashApp::adoptScreen(QScreen *screen) { + if (screen->geometry().isNull()) { + return; + } SplashWindow *w = new SplashWindow(m_testing, m_window, m_theme); w->setGeometry(screen->geometry()); w->setScreen(screen); diff --git a/logout-greeter/greeter.cpp b/logout-greeter/greeter.cpp index 165aa465d..54a7cc934 100644 --- a/logout-greeter/greeter.cpp +++ b/logout-greeter/greeter.cpp @@ -56,6 +56,9 @@ void Greeter::init() void Greeter::adoptScreen(QScreen *screen) { + if (screen->geometry().isNull()) { + return; + } // TODO: last argument is the theme, maybe add command line option for it? KSMShutdownDlg *w = new KSMShutdownDlg(nullptr, m_shutdownType); w->installEventFilter(this);