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>
Fri, 14 Oct 2011 20:43:18 +0000 (16:43 -0400)
Don't assume old tree is non-null and start rebinding it.

openbox/keyboard.c

index a3cd9d0e8b1844c5151b8d2419ffd36999d31eda..b3ec2ad5d84c01498439d61d0afa1f91aa41b2f5 100644 (file)
@@ -312,7 +312,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);