handle null pointer: sort_object

This commit is contained in:
Max Bruckner 2017-06-28 15:59:53 +02:00
parent 1af74c8cc1
commit c46c4d1559

View File

@ -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);
}