summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2011-10-14 16:43:18 -0400
committerDana Jansens <danakj@orodu.net>2011-10-16 18:51:51 -0400
commite4e7c2be52ee1a0b75d9d2feff57fdc992fedb9b (patch)
tree71ae228637acd1523cc858c954cbc9f687ed7574
parentc885c9a676e4860a68f0bdce4b926902f6597ebb (diff)
Fix crash when keyboard map changes and no keybindings exist.
Don't assume old tree is non-null and start rebinding it.
-rw-r--r--openbox/keyboard.c3
1 files changed, 2 insertions, 1 deletions
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);