diff options
author | Max Kellermann <max@duempel.org> | 2008-09-21 22:45:08 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-21 22:45:08 +0200 |
commit | 063648606de65ce668c3357ec7b08792ae055219 (patch) | |
tree | 4d6804cd6d2379b5d651561049469dee741d649a /src/screen_artist.c | |
parent | ba91edfee95a6198e2db9804fee9ddfeffa8a199 (diff) | |
download | mpd-063648606de65ce668c3357ec7b08792ae055219.tar.gz mpd-063648606de65ce668c3357ec7b08792ae055219.tar.xz mpd-063648606de65ce668c3357ec7b08792ae055219.zip |
browse: ensure that filelist!=NULL
There are several places where browser.filelist can become NULL.
Catch that everywhere and generate an empty filelist in this case.
Diffstat (limited to 'src/screen_artist.c')
-rw-r--r-- | src/screen_artist.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/screen_artist.c b/src/screen_artist.c index 2f97c723a..cf2d310ce 100644 --- a/src/screen_artist.c +++ b/src/screen_artist.c @@ -121,6 +121,9 @@ update_metalist(mpdclient_t *c, char *m_artist, char *m_album) mpdclient_filelist_search_utf8(c, TRUE, MPD_TABLE_ALBUM, album); + if (browser.filelist == NULL) + browser.filelist = filelist_new(NULL); + /* add a dummy entry for ".." */ filelist_prepend(browser.filelist, NULL); |