From 07fbd89ee60e798abe48280505cd45a9bdf64b12 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonathan=20Neusch=C3=A4fer?= Date: Fri, 3 Feb 2012 19:44:33 +0100 Subject: [PATCH] screen_keydef: don't crash on Ctrl-Space --- src/screen_keydef.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/screen_keydef.c b/src/screen_keydef.c index 4519008..32791b8 100644 --- a/src/screen_keydef.c +++ b/src/screen_keydef.c @@ -265,11 +265,16 @@ overwrite_key(int cmd_index, int key_index) key = screen_getch(buf); g_free(buf); - if (key==ERR) { + if (key == ERR) { screen_status_printf(_("Aborted")); return; } + if (key == '\0') { + screen_status_printf(_("Ctrl-Space can't be used")); + return; + } + cmd = find_key_command(key, cmds); if (cmd != CMD_NONE) { screen_status_printf(_("Error: key %s is already used for %s"), -- 2.30.2