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:
parent
4b123e0f61
commit
91ae257145
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue