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:
bjsylvia
2023-09-06 03:15:30 +08:00
committed by GitHub
parent a1ba36b77c
commit 2500da071a
+6 -1
View File
@@ -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)