Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

handle NULL passed to json_objct_object_get

Patch via Nikola Pajkovsky


git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@75 327403b1-1117-474d-bef2-5cb71233fd97
  • Loading branch information...
commit 276123efe09dde04a864317a3c273e4bd2b4fd26 1 parent 43d2f41
@jehiah authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  json_object.c
View
1  json_object.c
@@ -256,6 +256,7 @@ void json_object_object_add(struct json_object* jso, const char *key,
struct json_object* json_object_object_get(struct json_object* jso, const char *key)
{
+ if(!jso) return NULL;
return (struct json_object*) lh_table_lookup(jso->o.c_object, key);
}
Please sign in to comment.
Something went wrong with that request. Please try again.