aboutsummaryrefslogtreecommitdiffstats
path: root/src/filelist.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/filelist.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/filelist.c b/src/filelist.c
index 6f938ea30..7b4541606 100644
--- a/src/filelist.c
+++ b/src/filelist.c
@@ -21,6 +21,7 @@
#include "libmpdclient.h"
#include <string.h>
+#include <assert.h>
void
mpdclient_filelist_free(struct filelist *filelist)
@@ -51,7 +52,9 @@ mpdclient_filelist_find_song(struct filelist *fl,
{
GList *list = g_list_first(fl->list);
- while (list && song) {
+ assert(song != NULL);
+
+ while (list != NULL) {
filelist_entry_t *entry = list->data;
mpd_InfoEntity *entity = entry->entity;