aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-17 12:25:48 +0200
committerMax Kellermann <max@duempel.org>2008-09-17 12:25:48 +0200
commit3a278a50a6cc0df63c862a6bdee95d158b74e625 (patch)
tree03cd3dfe706c86ee1c32f29c3a4f8a5f42442ffc
parent6321db0068e012ec29372fbc058203e6d2855bee (diff)
downloadmpd-3a278a50a6cc0df63c862a6bdee95d158b74e625.tar.gz
mpd-3a278a50a6cc0df63c862a6bdee95d158b74e625.tar.xz
mpd-3a278a50a6cc0df63c862a6bdee95d158b74e625.zip
lyrics: don't check current.lines==NULL
current.lines is always initialized, and cannot be NULL, no need to check it.
-rw-r--r--src/screen_lyrics.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c
index cae07a73b..c2c780723 100644
--- a/src/screen_lyrics.c
+++ b/src/screen_lyrics.c
@@ -207,8 +207,8 @@ static int store_lyr_hd(void)
static const char *
list_callback(unsigned idx, mpd_unused int *highlight, mpd_unused void *data)
{
- if (current.lines == NULL || idx >= current.lines->len)
- return "";
+ if (idx >= current.lines->len)
+ return NULL;
return g_ptr_array_index(current.lines, idx);
}