]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Don’t crash if the numlock symbol cannot be found (Thanks xeen)
authorMichael Stapelberg <michael@stapelberg.de>
Thu, 27 Aug 2009 19:33:19 +0000 (21:33 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Thu, 27 Aug 2009 19:34:07 +0000 (21:34 +0200)
src/xcb.c

index 7ec4aa2cbe55aef313d6d3416c77a19546ca8565..a2f813b06898ff2932d93baf7a04c6257273988f 100644 (file)
--- 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