Code

browser: song must not be NULL in set_highlight()
authorMax Kellermann <max@duempel.org>
Fri, 19 Sep 2008 12:45:32 +0000 (14:45 +0200)
committerMax Kellermann <max@duempel.org>
Fri, 19 Sep 2008 12:45:32 +0000 (14:45 +0200)
The caller must not pass NULL to set_highlight().  Replaced check with
assertion.

src/screen_browser.c

index 0a06e5fb35898703a54cfb5c17a2171bf3efe49c..dbc7adad3c97054e19cf88a13a3de1b9ee39ef1c 100644 (file)
@@ -56,8 +56,7 @@ set_highlight(mpdclient_filelist_t *fl, mpd_Song *song, int highlight)
 {
        GList *list = g_list_first(fl->list);
 
-       if( !song )
-               return;
+       assert(song != NULL);
 
        while( list ) {
                filelist_entry_t *entry = list->data;