summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorColin Harrison <colin.harrison@virgin.net>2016-02-26 16:46:15 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2016-06-28 14:29:03 +0100
commit91ae2571458c50d9f782190d9f80815b770aefac (patch)
treeefe26887a411d16dddde9557432dc01946d8639b /hw
parent4b123e0f61eb55e59d30bf442499cf3b3f621c3b (diff)
hw/xwin: Fix a crash which occurs if focus returns to XWin after xkbcomp has failed
If WM_FOCUS is received while the "core devices failed" fatal error (due to xkbcomp failing) is displayed, winRestoreModeKeyState() attempts to dereference a NULL InputInfo.keyboard->key pointer. Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
Diffstat (limited to 'hw')
-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 ab53af4ba..00586c25b 100644
--- a/hw/xwin/winkeybd.c
+++ b/hw/xwin/winkeybd.c
@@ -246,7 +246,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