aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_thread.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-08 11:06:37 +0200
committerMax Kellermann <max@duempel.org>2008-10-08 11:06:37 +0200
commite1a4474ad4a0bc78ac338223b0528e0161f38e98 (patch)
tree86dddab67bc2f103827862bc887e643c54332557 /src/decoder_thread.c
parent4ab6b59aaf9db6d6108b0734da2307f7fac7fb4b (diff)
downloadmpd-e1a4474ad4a0bc78ac338223b0528e0161f38e98.tar.gz
mpd-e1a4474ad4a0bc78ac338223b0528e0161f38e98.tar.xz
mpd-e1a4474ad4a0bc78ac338223b0528e0161f38e98.zip
song: don't allow calling song_get_url(NULL)
The runtime check suggests that the author has somehow thought song_get_url(NULL) might be valid. It should not be. Replace it with an assertion.
Diffstat (limited to 'src/decoder_thread.c')
-rw-r--r--src/decoder_thread.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/decoder_thread.c b/src/decoder_thread.c
index a8ff2541b..594bfbc77 100644
--- a/src/decoder_thread.c
+++ b/src/decoder_thread.c
@@ -37,10 +37,7 @@ static void decodeStart(void)
char path_max_fs[MPD_PATH_MAX];
char path_max_utf8[MPD_PATH_MAX];
- if (!song_get_url(dc.next_song, path_max_utf8)) {
- dc.error = DECODE_ERROR_FILE;
- goto stop_no_close;
- }
+ song_get_url(dc.next_song, path_max_utf8);
if (!isRemoteUrl(path_max_utf8)) {
rmp2amp_r(path_max_fs,
utf8_to_fs_charset(path_max_fs, path_max_utf8));