From 39457338e408cb1cf44b3cfc5270809f418491d9 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 27 Aug 2009 21:33:19 +0200 Subject: [PATCH] =?utf8?q?Bugfix:=20Don=E2=80=99t=20crash=20if=20the=20num?= =?utf8?q?lock=20symbol=20cannot=20be=20found=20(Thanks=20xeen)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/xcb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xcb.c b/src/xcb.c index 7ec4aa2c..a2f813b0 100644 --- a/src/xcb.c +++ b/src/xcb.c @@ -237,6 +237,8 @@ void xcb_get_numlock_mask(xcb_connection_t *conn) { #else /* For now, we only use the first keysymbol. */ xcb_keycode_t *numlock_syms = xcb_key_symbols_get_keycode(keysyms, XCB_NUM_LOCK); + if (numlock_syms == NULL) + return; xcb_keycode_t numlock = *numlock_syms; free(numlock_syms); #endif -- 2.39.5