mirror of
https://github.com/DaveGamble/cJSON.git
synced 2026-10-27 12:26:34 +00:00
handle null pointer: sort_object
This commit is contained in:
1 parent
1af74c8cc1
commit
c46c4d1559
1 file changed
+4
@@ -550,6 +550,10 @@ static cJSON *sort_list(cJSON *list, const cJSON_bool case_sensitive)
|
|||||||
|
|
||||||
static void sort_object(cJSON * const object, const cJSON_bool case_sensitive)
|
static void sort_object(cJSON * const object, const cJSON_bool case_sensitive)
|
||||||
{
|
{
|
||||||
|
if (object == NULL)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
object->child = sort_list(object->child, case_sensitive);
|
object->child = sort_list(object->child, case_sensitive);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user