From e4e7c2be52ee1a0b75d9d2feff57fdc992fedb9b Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 14 Oct 2011 16:43:18 -0400 Subject: [PATCH] Fix crash when keyboard map changes and no keybindings exist. Don't assume old tree is non-null and start rebinding it. --- openbox/keyboard.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openbox/keyboard.c b/openbox/keyboard.c index 5b8016d..8f4424e 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); -- 1.9.1