Skip to content

Commit baf0fb7

Browse files
committed
Fix error when stopping empty animation player.
Check if animation exists before get section start time. Signed-off-by: Ainsley Su <[email protected]>
1 parent 2e14492 commit baf0fb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scene/animation/animation_player.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ void AnimationPlayer::_stop_internal(bool p_reset, bool p_keep_state) {
777777
_clear_caches();
778778
Playback &c = playback;
779779
// c.blend.clear();
780-
double start = get_section_start_time();
780+
double start = c.current.from ? get_section_start_time() : 0;
781781
if (p_reset) {
782782
c.blend.clear();
783783
if (p_keep_state) {

0 commit comments

Comments
 (0)