1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

fix(group): in lv_group_del() remove group from indev (lvgl#2963) (#2964)

This commit is contained in:
Tijs van Roon 2022-01-06 21:58:26 +01:00 committed by GitHub
parent e00b51b04f
commit 9b1335c622
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,6 +82,15 @@ void lv_group_del(lv_group_t * group)
if((*obj)->spec_attr)(*obj)->spec_attr->group_p = NULL;
}
/*Remove the group from any indev devices */
lv_indev_t * indev = lv_indev_get_next(NULL);
while(indev) {
if(indev->group == group) {
lv_indev_set_group(indev, NULL);
}
indev = lv_indev_get_next(indev);
}
_lv_ll_clear(&(group->obj_ll));
_lv_ll_remove(&LV_GC_ROOT(_lv_group_ll), group);
lv_mem_free(group);