diff --git a/src/ext_widgets/image_animation/image_animation.c b/src/ext_widgets/image_animation/image_animation.c index 55a0c5152..fdd6b30c6 100644 --- a/src/ext_widgets/image_animation/image_animation.c +++ b/src/ext_widgets/image_animation/image_animation.c @@ -116,7 +116,9 @@ static const widget_vtable_t s_image_animation_vtable = { static ret_t image_animation_delay_play(const timer_info_t* info) { widget_t* widget = WIDGET(info->ctx); + image_animation_t* image_animation = IMAGE_ANIMATION(widget); + image_animation->timer_id = TK_INVALID_ID; image_animation_play(widget); return RET_REMOVE; @@ -128,7 +130,7 @@ static ret_t image_animation_on_open(void* ctx, event_t* e) { if (image_animation->auto_play) { if (image_animation->delay > 0) { - timer_add(image_animation_delay_play, widget, image_animation->delay); + image_animation->timer_id = timer_add(image_animation_delay_play, widget, image_animation->delay); } else { image_animation_play(widget); }