summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2010-08-07 13:56:26 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2012-06-25 22:00:36 +0100
commit0d2b1ffcdee96eaed7e55aa33e4e7c25ba1fe24a (patch)
tree904e06d4159c7b12684114e711b3f5e61a0b9443
parent671144db5cbb007601be5a8924e6dc0e34c2dd5c (diff)
Cygwin/X: avoid a null dereference if xkbcomp didn't run successfullyjturney-cygwin
Avoid a null dereference crash during startup if xkbcomp didn't run successfully
-rw-r--r--hw/xwin/winkeybd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c
index 456e88aed..e57332a89 100644
--- a/hw/xwin/winkeybd.c
+++ b/hw/xwin/winkeybd.c
@@ -259,7 +259,7 @@ winRestoreModeKeyStates (void)
unsigned short internalKeyStates;
/* X server is being initialized */
- if (!inputInfo.keyboard)
+ if (!inputInfo.keyboard || !inputInfo.keyboard->key)
return;
/* Only process events if the rootwindow is mapped. The keyboard events