Fix crash when keyboard map changes and no keybindings exist.
authorDana Jansens <danakj@orodu.net>
Fri, 14 Oct 2011 20:43:18 +0000 (16:43 -0400)
committerDana Jansens <danakj@orodu.net>
Sun, 16 Oct 2011 22:51:51 +0000 (18:51 -0400)
Don't assume old tree is non-null and start rebinding it.

openbox/keyboard.c

index 5b8016d..8f4424e 100644 (file)
@@ -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);