Avoid crashing on embedded

tlw can be null. handleKeyEvent() is already fixed.

Change-Id: I92ffca30841147aca4fa536b80736c799aae4ac0
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
This commit is contained in:
Laszlo Agocs 2014-11-19 16:54:59 +01:00 committed by Laszlo Agocs
parent 37cce4cada
commit 9d771c70c3

View File

@ -314,7 +314,7 @@ void QWindowSystemInterface::handleExtendedKeyEvent(QWindow *tlw, ulong timestam
ushort count, bool tryShortcutOverride)
{
// on OS X we try the shortcut override even earlier and thus shouldn't handle it here
if (tryShortcutOverride && type == QEvent::KeyPress && QWindowSystemInterface::tryHandleShortcutEvent(tlw, timestamp, key, modifiers, text))
if (tryShortcutOverride && tlw && type == QEvent::KeyPress && QWindowSystemInterface::tryHandleShortcutEvent(tlw, timestamp, key, modifiers, text))
return;
QWindowSystemInterfacePrivate::KeyEvent * e =