Code

command: don't crash on Ctrl-Space
[ncmpc.git] / src / command.c
index a11a8dca9ce220a00e9b69fcf9dbb4cf950e8ad1..e3663339ee9837436bbfec350b4690024c32ba69 100644 (file)
@@ -445,7 +445,7 @@ get_keyboard_command(void)
        int key;
 
        key = wgetch(stdscr);
-       if (key == ERR)
+       if (key == ERR || key == '\0')
                return CMD_NONE;
 
 #ifdef HAVE_GETMOUSE