mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
handle null pointer: sort_object
This commit is contained in:
parent
1af74c8cc1
commit
c46c4d1559
@ -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)
|
||||
{
|
||||
if (object == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
object->child = sort_list(object->child, case_sensitive);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user