From: Dana Jansens Date: Fri, 14 Oct 2011 20:43:18 +0000 (-0400) Subject: Fix crash when keyboard map changes and no keybindings exist. X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fopenbox;a=commitdiff_plain;h=e4e7c2be52ee1a0b75d9d2feff57fdc992fedb9b Fix crash when keyboard map changes and no keybindings exist. Don't assume old tree is non-null and start rebinding it. --- diff --git a/openbox/keyboard.c b/openbox/keyboard.c index 5b8016dd..8f4424ea 100644 --- a/openbox/keyboard.c +++ b/openbox/keyboard.c @@ -313,7 +313,8 @@ void keyboard_rebind(void) old = keyboard_firstnode; keyboard_firstnode = NULL; - node_rebind(old); + if (old) + node_rebind(old); tree_destroy(old); set_curpos(NULL);