Skip to content

Commit

Permalink
handle NULL passed to json_objct_object_get
Browse files Browse the repository at this point in the history
Patch via Nikola Pajkovsky


git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@75 327403b1-1117-474d-bef2-5cb71233fd97
  • Loading branch information
jehiah committed May 26, 2011
1 parent 43d2f41 commit 276123e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions json_object.c
Expand Up @@ -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);
}

Expand Down

0 comments on commit 276123e

Please sign in to comment.