From cd92049a95e6c762dadf011fad93f5ca151375fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Thu, 5 Sep 2019 12:37:00 +0200 Subject: [PATCH] Prevent crash in QWasmScreen::resizeMaximizedWindows() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit screen() may return a null QScreen pointer during screen initialization. Fixes: QTBUG-78118 Change-Id: Ide26eb3f06861c38cd7ae56789dd010d4cd7e572 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/wasm/qwasmscreen.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/platforms/wasm/qwasmscreen.cpp b/src/plugins/platforms/wasm/qwasmscreen.cpp index f2eabfa486..e536bc0ee3 100644 --- a/src/plugins/platforms/wasm/qwasmscreen.cpp +++ b/src/plugins/platforms/wasm/qwasmscreen.cpp @@ -139,6 +139,8 @@ QPlatformCursor *QWasmScreen::cursor() const void QWasmScreen::resizeMaximizedWindows() { + if (!screen()) + return; QPlatformScreen::resizeMaximizedWindows(); }