From 276123efe09dde04a864317a3c273e4bd2b4fd26 Mon Sep 17 00:00:00 2001 From: Jehiah Czebotar Date: Thu, 26 May 2011 01:34:52 +0000 Subject: [PATCH] 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 --- json_object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/json_object.c b/json_object.c index f0d43241..fc52f5cd 100644 --- a/json_object.c +++ b/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); } -- 2.47.2