From c86f4c7f580b80967d9d6de082dbdb8ab86127f0 Mon Sep 17 00:00:00 2001 From: dzil123 <5725958+dzil123@users.noreply.github.com> Date: Sun, 11 Sep 2022 02:33:59 -0700 Subject: [PATCH] Ignore node rename if already exited blend tree (cherry picked from commit f9bee9099457a7e582ad785f5134a86ed1f8fac5) --- editor/plugins/animation_blend_tree_editor_plugin.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp index 2e61a6a8864..efcf5e809ce 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.cpp +++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp @@ -843,6 +843,10 @@ void AnimationNodeBlendTreeEditor::_bind_methods() { AnimationNodeBlendTreeEditor *AnimationNodeBlendTreeEditor::singleton = nullptr; void AnimationNodeBlendTreeEditor::_node_renamed(const String &p_text, Ref p_node) { + if (blend_tree.is_null()) { + return; + } + String prev_name = blend_tree->get_node_name(p_node); ERR_FAIL_COND(prev_name == String()); GraphNode *gn = Object::cast_to(graph->get_node(prev_name));