summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-09-13 10:42:49 +0200
committerGitHub <noreply@github.com>2022-09-13 10:42:49 +0200
commited381078a41a06904de66276c97b856adfc1701e (patch)
treeb6ee4286378fcab3eca5784d9cf7ed907dde48c3 /editor
parent967938d15eb64b6bc1b30bf453fe83f3d43183a5 (diff)
parentf9bee9099457a7e582ad785f5134a86ed1f8fac5 (diff)
Merge pull request #65651 from dzil123/animation_tree_node_rename
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index f1e6c70549..f4b8646e18 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -907,6 +907,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.is_empty());
GraphNode *gn = Object::cast_to<GraphNode>(graph->get_node(prev_name));