diff options
Diffstat (limited to 'src/screen_browser.c')
-rw-r--r-- | src/screen_browser.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/screen_browser.c b/src/screen_browser.c index b5ce64171..6a5bbd233 100644 --- a/src/screen_browser.c +++ b/src/screen_browser.c @@ -56,11 +56,13 @@ clear_highlights(mpdclient_filelist_t *fl) static void set_highlight(mpdclient_filelist_t *fl, mpd_Song *song, int highlight) { - struct filelist_entry *entry = filelist_find_song(fl, song); + int i = filelist_find_song(fl, song); + struct filelist_entry *entry; - if (entry == NULL) + if (i < 0) return; + entry = filelist_get(fl, i); if (highlight) entry->flags |= HIGHLIGHT; else |