diff options
Diffstat (limited to 'json_tokener.c')
-rw-r--r-- | json_tokener.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/json_tokener.c b/json_tokener.c index df106b1..1921de6 100644 --- a/json_tokener.c +++ b/json_tokener.c @@ -113,6 +113,8 @@ struct json_object* json_tokener_parse(const char *str) struct json_object* obj; tok = json_tokener_new(); + if (!tok) + return NULL; obj = json_tokener_parse_ex(tok, str, -1); if(tok->err != json_tokener_success) obj = NULL; |