aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/json.c b/lib/json.c
index cbd6eaad..24288f94 100644
--- a/lib/json.c
+++ b/lib/json.c
@@ -508,7 +508,7 @@ whitespace:
case ']':
- if (top->type == json_array) {
+ if (top && top->type == json_array) {
flags = (flags & ~(flag_need_comma | flag_seek_value)) | flag_next;
} else { sprintf(error, "%d:%d: Unexpected ]", cur_line, e_off);
goto e_failed; }