X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fscreen_play.c;h=37825e6b640f2be6c4c20ec3931421a3fc8b6c3c;hb=254f6648bdcd05aa477da05627d1f99b528ec894;hp=05457f76263e95fafbed718c8d80caa401bd1d40;hpb=807add769f3b1696f8fea357af04e5d07a5cb7bb;p=ncmpc.git diff --git a/src/screen_play.c b/src/screen_play.c index 05457f7..37825e6 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -136,8 +136,8 @@ list_callback(unsigned idx, bool *highlight, char **second_column, G_GNUC_UNUSED static char songname[MAX_SONG_LENGTH]; struct mpd_song *song; - if (playlist == NULL || idx >= playlist_length(playlist)) - return NULL; + assert(playlist != NULL); + assert(idx < playlist_length(playlist)); song = playlist_get(playlist, idx); if ((int)mpd_song_get_id(song) == current_song_id)