diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-03-19 09:08:01 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-03-20 00:36:20 +0000 |
commit | 1cb439dc948d6e610da49331184f0a660ef57b4e (patch) | |
tree | f90e8887fadd098da10bed58da1e9443510f867f | |
parent | 323b00e38c38cc864d136d70befd106400c50163 (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>
-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 20d6e6e8d4..072012064f 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -1083,7 +1083,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; |