From 914480e256ee4e6e92c815a60fa3be6da44fb3d4 Mon Sep 17 00:00:00 2001 From: Malcolm Anderson Date: Wed, 18 Jun 2025 16:43:46 -0700 Subject: [PATCH] Skip killed/invalid subtween --- scene/animation/tween.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp index 55ca97cd954..a6c3429dab0 100644 --- a/scene/animation/tween.cpp +++ b/scene/animation/tween.cpp @@ -875,7 +875,14 @@ void SubtweenTweener::start() { // Reset the subtween. subtween->stop(); - subtween->play(); + + // It's possible that a subtween could be killed before it is started; + // if so, we just want to skip it entirely. + if (subtween->is_valid()) { + subtween->play(); + } else { + _finish(); + } } bool SubtweenTweener::step(double &r_delta) {