Code

screen_help: remove CMD_SCREEN_SONG if song screen is disabled
authorIhar Hrachyshka <ihar.hrachyshka@gmail.com>
Wed, 21 Jul 2010 05:43:01 +0000 (07:43 +0200)
committerMax Kellermann <max@duempel.org>
Wed, 21 Jul 2010 06:00:42 +0000 (08:00 +0200)
This fixes a NULL pointer dereference, caused by
get_key_names(CMD_SCREEN_SONG)==NULL.

src/screen_help.c

index 2ac90b774c30bcc125af11eb4a5e02e274b60ed2..faa9603e7aea0aaf1db978cd930852bc3f546f61 100644 (file)
@@ -105,7 +105,9 @@ static const struct help_text_row help_text[] = {
        { 0, CMD_LIST_JUMP, NULL },
        { 0, CMD_TOGGLE_FIND_WRAP, NULL },
        { 0, CMD_LOCATE, NULL },
+#ifdef ENABLE_SONG_SCREEN
        { 0, CMD_SCREEN_SONG, NULL },
+#endif
        { 0, CMD_NONE, NULL },
        { 0, CMD_QUIT, NULL },