diff options
author | Ainsley Su <vhtmscyo@gmail.com> | 2024-10-03 10:59:36 +0200 |
---|---|---|
committer | Ainsley Su <vhtmscyo@gmail.com> | 2024-10-03 11:04:27 +0200 |
commit | baf0fb7e26e9aa7943f1d7e2b6e10a66cd2ecb26 (patch) | |
tree | 31d5ea6929756b1292f07ce6f5fbf907fd7b1e57 | |
parent | 2e144928793f17ebd70e1475bb7a7f4fd1095484 (diff) | |
download | redot-engine-baf0fb7e26e9aa7943f1d7e2b6e10a66cd2ecb26.tar.gz |
Fix error when stopping empty animation player.
Check if animation exists before get section start time.
Signed-off-by: Ainsley Su <vhtmscyo@gmail.com>
-rw-r--r-- | scene/animation/animation_player.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index bc951e4e14..8a2ca47920 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -777,7 +777,7 @@ void AnimationPlayer::_stop_internal(bool p_reset, bool p_keep_state) { _clear_caches(); Playback &c = playback; // c.blend.clear(); - double start = get_section_start_time(); + double start = c.current.from ? get_section_start_time() : 0; if (p_reset) { c.blend.clear(); if (p_keep_state) { |