From: Max Kellermann Date: Mon, 14 Sep 2009 09:43:00 +0000 (+0200) Subject: screen_play: another missing second_column NULL check X-Git-Tag: release-0.15~7 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5b4b59854182c37116738ee22784f6d003219596;p=ncmpc.git screen_play: another missing second_column NULL check screen_play's list_callback could segfault, when second_column pointed to a NULL pointer. --- diff --git a/src/screen_play.c b/src/screen_play.c index 8683ee0..5c17f51 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -130,7 +130,7 @@ list_callback(unsigned idx, bool *highlight, char **second_column, G_GNUC_UNUSED if (idx == lw->selected) { int second_column_len = 0; - if (second_column) + if (second_column != NULL && *second_column != NULL) second_column_len = strlen(*second_column); if (options.scroll && utf8_width(songname) > (unsigned)(COLS - second_column_len - 1) ) {