Ignore node rename if already exited blend tree

(cherry picked from commit f9bee90994)
This commit is contained in:
dzil123 2022-09-11 02:33:59 -07:00 committed by Rémi Verschelde
parent c8a748e7b6
commit c86f4c7f58

View file

@ -843,6 +843,10 @@ void AnimationNodeBlendTreeEditor::_bind_methods() {
AnimationNodeBlendTreeEditor *AnimationNodeBlendTreeEditor::singleton = nullptr;
void AnimationNodeBlendTreeEditor::_node_renamed(const String &p_text, Ref<AnimationNode> 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<GraphNode>(graph->get_node(prev_name));