aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist/xspf_playlist_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/playlist/xspf_playlist_plugin.c')
-rw-r--r--src/playlist/xspf_playlist_plugin.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/playlist/xspf_playlist_plugin.c b/src/playlist/xspf_playlist_plugin.c
index 687765b3a..a36463500 100644
--- a/src/playlist/xspf_playlist_plugin.c
+++ b/src/playlist/xspf_playlist_plugin.c
@@ -253,9 +253,17 @@ xspf_open_stream(struct input_stream *is)
&parser, xspf_parser_destroy);
while (true) {
- nbytes = input_stream_read(is, buffer, sizeof(buffer));
- if (nbytes == 0)
+ nbytes = input_stream_read(is, buffer, sizeof(buffer), &error);
+ if (nbytes == 0) {
+ if (error != NULL) {
+ g_markup_parse_context_free(context);
+ g_warning("%s", error->message);
+ g_error_free(error);
+ return NULL;
+ }
+
break;
+ }
success = g_markup_parse_context_parse(context, buffer, nbytes,
&error);