summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-01-28 14:54:14 +0100
committerkobewi <kobewi4e@gmail.com>2022-01-28 14:54:14 +0100
commit4f5c3d5a60b867e9d9e239a9f5db8c897d9f2a4d (patch)
treed59bf0d2b3333c13536bf0f057b4896e8008afd3
parentbb1f55c38741e9b820fc0d3ef9e005cbf8c4c184 (diff)
Fix not being able to stop() empty Tweens
-rw-r--r--scene/animation/tween.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index a37c6f5355..53ff3eeeae 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();