diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2015-04-13 23:54:16 +0100 |
---|---|---|
committer | Philip Withnall <philip@tecnocode.co.uk> | 2015-04-14 00:00:25 +0100 |
commit | 220b4671bc4a8f503b4fdbebb06c01dd6c016b80 (patch) | |
tree | 598114d6e52ccce28b1516a73c12550d00341eb5 /gdata/gdata-feed.c | |
parent | 4496726447dd431004ccf872c45db6538df62fc2 (diff) | |
download | libgdata-220b4671bc4a8f503b4fdbebb06c01dd6c016b80.tar.gz |
core: Fix JSON parser state on hitting an error
Close the entry element on error, otherwise the JsonParser stays in its
error state.
Diffstat (limited to 'gdata/gdata-feed.c')
-rw-r--r-- | gdata/gdata-feed.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdata/gdata-feed.c b/gdata/gdata-feed.c index 68ed7a06..9609c8f3 100644 --- a/gdata/gdata-feed.c +++ b/gdata/gdata-feed.c @@ -612,8 +612,10 @@ parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GEr /* Parse the node, passing it the reader cursor. */ entry = GDATA_ENTRY (_gdata_parsable_new_from_json_node (entry_type, reader, NULL, error)); - if (entry == NULL) + if (entry == NULL) { + json_reader_end_element (reader); return FALSE; + } /* Calls the callbacks in the main thread */ if (data != NULL) |