aboutsummaryrefslogtreecommitdiff
path: root/json-parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'json-parser.c')
-rw-r--r--json-parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/json-parser.c b/json-parser.c
index f3debcb6ef..579928f2ee 100644
--- a/json-parser.c
+++ b/json-parser.c
@@ -264,7 +264,7 @@ static int parse_pair(JSONParserContext *ctxt, QDict *dict, QList **tokens, va_l
peek = qlist_peek(working);
key = parse_value(ctxt, &working, ap);
- if (qobject_type(key) != QTYPE_QSTRING) {
+ if (!key || qobject_type(key) != QTYPE_QSTRING) {
parse_error(ctxt, peek, "key is not a string in object");
goto out;
}