diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-10-07 21:20:34 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-07 21:20:34 +0200 |
commit | 0d34815f6cfe1a75467e7c8f9406ff15bcbe10ba (patch) | |
tree | d205636c8092c76ac235c90e51dff19ff3742547 /src/directory.c | |
parent | 016af692d9b7040ec1cd15c92a70ecb4000003f6 (diff) | |
download | mpd-0d34815f6cfe1a75467e7c8f9406ff15bcbe10ba.tar.gz mpd-0d34815f6cfe1a75467e7c8f9406ff15bcbe10ba.tar.xz mpd-0d34815f6cfe1a75467e7c8f9406ff15bcbe10ba.zip |
Assert if we don't have song or song->url set
song objects cannot exist without a path or URL
Diffstat (limited to 'src/directory.c')
-rw-r--r-- | src/directory.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/directory.c b/src/directory.c index 8eb18d463..e38a904f0 100644 --- a/src/directory.c +++ b/src/directory.c @@ -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); |