From 4f5c3d5a60b867e9d9e239a9f5db8c897d9f2a4d Mon Sep 17 00:00:00 2001 From: kobewi Date: Fri, 28 Jan 2022 14:54:14 +0100 Subject: [PATCH] Fix not being able to stop() empty Tweens --- scene/animation/tween.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp index a37c6f53554..53ff3eeeae1 100644 --- a/scene/animation/tween.cpp +++ b/scene/animation/tween.cpp @@ -249,8 +249,6 @@ bool Tween::custom_step(float p_delta) { } bool Tween::step(float p_delta) { - ERR_FAIL_COND_V_MSG(tweeners.is_empty(), false, "Tween started, but has no Tweeners."); - if (dead) { return false; } @@ -271,6 +269,7 @@ bool Tween::step(float p_delta) { } if (!started) { + ERR_FAIL_COND_V_MSG(tweeners.is_empty(), false, "Tween started, but has no Tweeners."); current_step = 0; loops_done = 0; start_tweeners();