You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix error when stopping empty animation player.
Check if animation exists before get section start time. Signed-off-by: Ainsley Su <vhtmscyo@gmail.com>
This commit is contained in:
@@ -777,7 +777,7 @@ void AnimationPlayer::_stop_internal(bool p_reset, bool p_keep_state) {
|
|||||||
_clear_caches();
|
_clear_caches();
|
||||||
Playback &c = playback;
|
Playback &c = playback;
|
||||||
// c.blend.clear();
|
// c.blend.clear();
|
||||||
double start = get_section_start_time();
|
double start = c.current.from ? get_section_start_time() : 0;
|
||||||
if (p_reset) {
|
if (p_reset) {
|
||||||
c.blend.clear();
|
c.blend.clear();
|
||||||
if (p_keep_state) {
|
if (p_keep_state) {
|
||||||
|
|||||||
Reference in New Issue
Block a user