mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-22 15:24:16 +08:00
feat(meter): fix crash when deleting meter, should clean up indicator's animation (#4521)
Signed-off-by: YanXiaowei <yanxiaowei@xiaomi.com> Co-authored-by: YanXiaowei <yanxiaowei@xiaomi.com>
This commit is contained in:
@@ -286,8 +286,13 @@ static void lv_meter_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
|
||||
LV_UNUSED(class_p);
|
||||
LV_ASSERT_OBJ(obj, MY_CLASS);
|
||||
lv_meter_t * meter = (lv_meter_t *)obj;
|
||||
_lv_ll_clear(&meter->indicator_ll);
|
||||
|
||||
lv_meter_indicator_t * indic;
|
||||
_LV_LL_READ_BACK(&meter->indicator_ll, indic) {
|
||||
lv_anim_del(indic, NULL);
|
||||
}
|
||||
|
||||
_lv_ll_clear(&meter->indicator_ll);
|
||||
}
|
||||
|
||||
static void lv_meter_event(const lv_obj_class_t * class_p, lv_event_t * e)
|
||||
|
||||
Reference in New Issue
Block a user