From 0d2b1ffcdee96eaed7e55aa33e4e7c25ba1fe24a Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Sat, 7 Aug 2010 13:56:26 +0100 Subject: Cygwin/X: avoid a null dereference if xkbcomp didn't run successfully Avoid a null dereference crash during startup if xkbcomp didn't run successfully --- hw/xwin/winkeybd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3