From a17ee0f9d8f444184932bf74bf46032a125679a8 Mon Sep 17 00:00:00 2001 From: cdemirer <41021322+cdemirer@users.noreply.github.com> Date: Thu, 5 Feb 2026 22:17:13 +0300 Subject: [PATCH] Fix use-after-free in Animation Blend Tree caused by unsafe usage of AHashMap. --- scene/animation/animation_blend_tree.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp index 091a59672d8..bccad415727 100644 --- a/scene/animation/animation_blend_tree.cpp +++ b/scene/animation/animation_blend_tree.cpp @@ -1590,7 +1590,8 @@ void AnimationNodeBlendTree::rename_node(const StringName &p_name, const StringN nodes[p_name].node->disconnect_changed(callable_mp(this, &AnimationNodeBlendTree::_node_changed)); - nodes[p_new_name] = nodes[p_name]; + const Node temp_copy = nodes[p_name]; + nodes[p_new_name] = temp_copy; // might realloc nodes.erase(p_name); // Rename connections.