minor fixes

This commit is contained in:
Gabor Kiss-Vamosi
2018-11-11 19:56:30 +01:00
parent b44da3c27f
commit 4007834f15
2 changed files with 35 additions and 14 deletions

View File

@@ -360,10 +360,13 @@ lv_res_t lv_obj_del(lv_obj_t * obj)
void lv_obj_clean(lv_obj_t * obj)
{
lv_obj_t * child = lv_obj_get_child(obj, NULL);
lv_obj_t * child_next;
while(child) {
/* Read the next child before deleting the current
* because the next couldn't be read from a deleted (invalid) node*/
child_next = lv_obj_get_child(obj, child);
lv_obj_del(child);
child = lv_obj_get_child(obj, child);
child = child_next;
}
}