From 88da0c8d4f815380ab861c2fc4cb3b749759554e Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 12 Aug 2022 18:42:34 +0200 Subject: [PATCH] Backported from Godot4: Fix animation player crashing when caching disabled tracks - MinusKube https://github.com/godotengine/godot/commit/a73882305ce1eacb9795e95b48118b7bb745b796 --- scene/animation/animation_player.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 634e5ec13..bd3c4dda6 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -255,11 +255,12 @@ void AnimationPlayer::_ensure_node_caches(AnimationData *p_anim, Node *p_root_ov setup_pass++; for (int i = 0; i < a->get_track_count(); i++) { + p_anim->node_cache.write[i] = NULL; + if (!a->track_is_enabled(i)) { continue; } - p_anim->node_cache.write[i] = NULL; RES resource; Vector leftover_path; Node *child = parent->get_node_and_resource(a->track_get_path(i), resource, leftover_path);