From d8e7cb5329e8290f34eed57b5ff3037350ea273e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Boh=C3=A1=C4=8Dek?= Date: Sun, 25 Jun 2023 20:20:01 +0200 Subject: [PATCH] fix: do not call apply on animation after last step --- src/animations/animation_manager.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/animations/animation_manager.rs b/src/animations/animation_manager.rs index 2e25b3e..e13a607 100644 --- a/src/animations/animation_manager.rs +++ b/src/animations/animation_manager.rs @@ -44,7 +44,10 @@ impl> AnimationManager { } else { return Err(WouldBlock); }; - animation.apply(map)?; + + if !step_result.is_err() { + animation.apply(map)?; + } } let step = match step_result { -- 2.48.1