Windows QPA: Fix potential crash in leave event handling
Add a check for window != nullptr.
Amends af5c8d04fb.
Task-number: QTBUG-67101
Task-number: QTBUG-57864
Change-Id: I2bbbbe514fc494fd569d0932d508c53c0544f665
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
bb10
parent
323b00e38c
commit
1cb439dc94
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue