Assert if we don't have song or song->url set

song objects cannot exist without a path or URL
This commit is contained in:
Eric Wong
2008-10-07 21:20:34 +02:00
committed by Max Kellermann
parent 016af692d9
commit 0d34815f6c
2 changed files with 10 additions and 4 deletions

View File

@@ -298,8 +298,8 @@ removeDeletedFromDirectory(char *path_max_tmp, Directory * directory)
for (i = sv->nr; --i >= 0; ) { /* cleaner deletes if we go backwards */
Song *song = sv->base[i];
if (!song || !*song->url)
continue; /* does this happen?, perhaps assert() */
assert(song);
assert(*song->url);
if (dirname)
sprintf(path_max_tmp, "%s/%s", dirname, song->url);