Make sure the root pointer is null for errors at the top level

This commit is contained in:
Eric Fischer 2014-02-08 09:41:49 -08:00
parent b72bb6f1f4
commit 5a01013642

View File

@ -182,6 +182,12 @@ static void string_free(struct string *s) {
json_object *json_read_separators(json_pull *j, json_separator_callback cb, void *state) {
int c;
// In case there is an error at the top level
if (j->container == NULL) {
j->root = NULL;
}
again:
/////////////////////////// Whitespace