diff options
author | Jan Arve Saether <jan-arve.saether@theqtcompany.com> | 2014-11-05 14:31:30 +0100 |
---|---|---|
committer | Jan Arve Sæther <jan-arve.saether@theqtcompany.com> | 2014-11-05 17:09:37 +0100 |
commit | f31cee9366f1c3e5412221ee13a47c8c29056bcd (patch) | |
tree | 5820d4d4ad263a829f3f0b7f803524fd371dcaa7 /src | |
parent | 51ddaabb81ae55d13aaabfdf45ee7db4d7c9bba2 (diff) |
Do not crash during global key presses.
This crashed because on Android we called
QWindowSystemInterface::handleKeyEvent() with QWindow argument set to 0
This is a regression and started to crash after commit d7ca800a8
(it added the call to tryHandleShortcutEvent() without checking the
window pointer).
Change-Id: Iefd5fe782a0f7f1e1569580ed4fcb2ef60eed2d2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index 073f351a8e..ec158bdc40 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -287,7 +287,7 @@ void QWindowSystemInterface::handleKeyEvent(QWindow *w, QEvent::Type t, int k, Q void QWindowSystemInterface::handleKeyEvent(QWindow *tlw, ulong timestamp, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text, bool autorep, ushort count) { - if (t == QEvent::KeyPress && QWindowSystemInterface::tryHandleShortcutEvent(tlw, timestamp, k, mods, text)) + if (t == QEvent::KeyPress && tlw && QWindowSystemInterface::tryHandleShortcutEvent(tlw, timestamp, k, mods, text)) return; QWindowSystemInterfacePrivate::KeyEvent * e = |