From 1d159f7fc0f6c8534cb8be0457138507fcb8a75c Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Tue, 21 Sep 2010 20:09:13 +0200 Subject: fixed crash if streamer_reset is called after streamer_free had been called --- plugins/vfs_curl/vfs_curl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins/vfs_curl') diff --git a/plugins/vfs_curl/vfs_curl.c b/plugins/vfs_curl/vfs_curl.c index 6f65f4e6..3f612784 100644 --- a/plugins/vfs_curl/vfs_curl.c +++ b/plugins/vfs_curl/vfs_curl.c @@ -689,8 +689,11 @@ http_read (void *ptr, size_t size, size_t nmemb, DB_FILE *stream) { http_stream_reset (fp); fp->status = STATUS_SEEK; deadbeef->mutex_unlock (fp->mutex); - deadbeef->streamer_reset (1); - continue; + if (fp->track) { // don't touch streamer if the stream is not assosiated with a track + deadbeef->streamer_reset (1); + continue; + } + return 0; } } int skip = min (fp->remaining, fp->skipbytes); -- cgit v1.2.3