@@ -390,6 +390,12 @@ static void obj_del_core(lv_obj_t * obj)
|
||||
indev = lv_indev_get_next(indev);
|
||||
}
|
||||
|
||||
/*Delete all pending async del-s*/
|
||||
lv_res_t async_cancel_res = LV_RES_OK;
|
||||
while(async_cancel_res == LV_RES_OK) {
|
||||
async_cancel_res = lv_async_call_cancel(lv_obj_del_async_cb, obj);
|
||||
}
|
||||
|
||||
/*All children deleted. Now clean up the object specific data*/
|
||||
_lv_obj_destruct(obj);
|
||||
|
||||
|
||||
@@ -98,8 +98,11 @@ lv_res_t lv_async_call_cancel(lv_async_cb_t async_xcb, void * user_data)
|
||||
|
||||
static void lv_async_timer_cb(lv_timer_t * timer)
|
||||
{
|
||||
/*Save the info because an lv_async_call_cancel might delete it in the callback*/
|
||||
lv_async_info_t * info = (lv_async_info_t *)timer->user_data;
|
||||
|
||||
info->cb(info->user_data);
|
||||
lv_async_info_t info_save = *info;
|
||||
lv_timer_del(timer);
|
||||
lv_free(info);
|
||||
|
||||
info_save.cb(info_save.user_data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user