mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
Merge 520af49393
into cb8693b058
This commit is contained in:
commit
aebee7e671
2
cJSON.c
2
cJSON.c
@ -2186,7 +2186,7 @@ CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * c
|
||||
|
||||
CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item)
|
||||
{
|
||||
if ((parent == NULL) || (item == NULL))
|
||||
if ((parent == NULL) || (item == NULL) || (item->prev == NULL))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user