From ab94450c29aac9f8dc588be1fc2c587ba9832472 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 a3cd9d0e..b3ec2ad5 100644 --- a/openbox/keyboard.c +++ b/openbox/keyboard.c @@ -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); -- 2.34.1