diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> | 2013-08-21 14:10:29 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-26 23:52:03 +0200 |
commit | fa8786c3971ba1614d7b6357a2dcb87fc9cdc91d (patch) | |
tree | 7c08f0d637ee9515ab6466b2123553a300ff66c2 | |
parent | 31e665c7cd9b2edb25fa695bed9c528c95ad0c64 (diff) |
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>
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 7d2c710c52..6653d5a207 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -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; } |