summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e67d321)
raw | patch | inline | side by side (parent: e67d321)
author | Max Kellermann <max@duempel.org> | |
Mon, 14 Sep 2009 09:43:00 +0000 (11:43 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Mon, 14 Sep 2009 09:43:00 +0000 (11:43 +0200) |
screen_play's list_callback could segfault, when second_column pointed
to a NULL pointer.
to a NULL pointer.
src/screen_play.c | patch | blob | history |
diff --git a/src/screen_play.c b/src/screen_play.c
index 8683ee013d7c1ef6e53de4d888778c90ff40f091..5c17f51b2d0ea509ed9678c5d31b288607d1505b 100644 (file)
--- 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) )
{