diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-03-19 09:08:01 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-03-20 07:27:50 +0000 |
commit | 2d214a201cb666e3cd91ee43f07aebd3a8b9367b (patch) | |
tree | a2591b51cfecf1f58829d63808c968c3cc308d37 | |
parent | 3714c5698adf52f7b1115dc5e9286cf80e7c630e (diff) |
Windows QPA: Fix potential crash in leave event handling
Add a check for window != nullptr.
Amends af5c8d04fb0c9ddda58925e4862e857c78a5e563.
Task-number: QTBUG-67101
Task-number: QTBUG-57864
Change-Id: I2bbbbe514fc494fd569d0932d508c53c0544f665
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 1cb439dc948d6e610da49331184f0a660ef57b4e)
-rw-r--r-- | src/plugins/platforms/windows/qwindowscontext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index cda6c99ad0..5d444f503d 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -1075,7 +1075,7 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, case QtWindows::LeaveEvent: { QWindow *window = platformWindow->window(); - while (window->flags() & Qt::WindowTransparentForInput) + while (window && (window->flags() & Qt::WindowTransparentForInput)) window = window->parent(); if (!window) return false; |