Skip to content

Commit

Permalink
Fix error when stopping empty animation player.
Browse files Browse the repository at this point in the history
Check if animation exists before get section start time.

Signed-off-by: Ainsley Su <vhtmscyo@gmail.com>
  • Loading branch information
EAinsley committed Oct 3, 2024
1 parent 2e14492 commit baf0fb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/animation/animation_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit baf0fb7

Please sign in to comment.