summaryrefslogtreecommitdiff
path: root/streamer.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-01-08 22:41:18 +0100
committerGravatar waker <wakeroid@gmail.com>2012-01-08 22:41:18 +0100
commitff45addab62a5ed655938e66165f610720f5ff6d (patch)
tree9b3f3d051e9baa3c7bf97bfd761b243559e12729 /streamer.c
parentd232352925df36cf31280bbff9c773145826a4fd (diff)
fix crash/memtrash when trying to open broken url
Diffstat (limited to 'streamer.c')
-rw-r--r--streamer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/streamer.c b/streamer.c
index b1829727..5ff4b4f3 100644
--- a/streamer.c
+++ b/streamer.c
@@ -711,11 +711,15 @@ streamer_set_current (playItem_t *it) {
const char *plug = NULL;
trace ("\033[0;34mgetting content-type\033[37;0m\n");
if (!fp) {
+ err = -1;
goto error;
}
const char *ct = vfs_get_content_type (fp);
if (!ct) {
vfs_fclose (fp);
+ fp = NULL;
+ streamer_file = NULL;
+ err = -1;
goto error;
}
trace ("got content-type: %s\n", ct);