Prevent occasional crash in qwaylandinputdevice.cpp
authorSamuel Rødal <samuel.rodal@nokia.com>
Mon, 13 Feb 2012 19:38:44 +0000 (20:38 +0100)
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>
Mon, 13 Feb 2012 20:25:32 +0000 (21:25 +0100)
Change-Id: I86559add9925dad6aef530433dd92066f1708757
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
src/plugins/platforms/wayland/qwaylandinputdevice.cpp

index ee4ffc1..88b1bda 100644 (file)
@@ -268,7 +268,7 @@ void QWaylandInputDevice::inputHandleKey(void *data,
     QEvent::Type type;
     char s[2];
 
-    if (window == NULL) {
+    if (window == NULL || !inputDevice->mXkb) {
        /* We destroyed the keyboard focus surface, but the server
         * didn't get the message yet. */
        return;