diff --git a/cJSON_Utils.c b/cJSON_Utils.c index b39e432..e72f140 100644 --- a/cJSON_Utils.c +++ b/cJSON_Utils.c @@ -504,12 +504,7 @@ CJSON_PUBLIC(int) cJSONUtils_ApplyPatches(cJSON *object, cJSON *patches) { int err = 0; - if (patches == NULL) - { - return 1; - } - - if (cJSON_IsArray(patches)) + if (!cJSON_IsArray(patches)) { /* malformed patches. */ return 1;