mirror of
https://github.com/DaveGamble/cJSON.git
synced 2024-12-27 14:14:07 +08: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…
x
Reference in New Issue
Block a user