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>
This commit is contained in:
Colin Harrison 2016-02-26 16:46:15 +00:00 committed by Jon Turney
parent 4b123e0f61
commit 91ae257145
1 changed files with 1 additions and 1 deletions

View File

@ -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