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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user