Android: Fix crash when hitting Back button to quit
On Android, it's possible to reach the condition when window == 0 if you hit the Back key, since the previous bail-out is disabled for this case. To avoid a null-pointer dereference, an extra check is required. Change-Id: Ic898cd82dd6e52c24505dd2248c98efcefc15b1c Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
This commit is contained in:
parent
31e665c7cd
commit
fa8786c397
@ -1557,7 +1557,7 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE
|
||||
) {
|
||||
return;
|
||||
}
|
||||
if (window->d_func()->blockedByModalWindow) {
|
||||
if (window && window->d_func()->blockedByModalWindow) {
|
||||
// a modal window is blocking this window, don't allow key events through
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user