2
0
Эх сурвалжийг харах

Fix crash after renaming an animation node

(cherry picked from commit 5ea4a8b4214571087a42a29b2caf9053bbb2e548)
Haoyu Qiu 3 жил өмнө
parent
commit
c9f3719417

+ 3 - 0
editor/plugins/animation_blend_tree_editor_plugin.cpp

@@ -915,6 +915,9 @@ void AnimationNodeBlendTreeEditor::_node_renamed(const String &p_text, Ref<Anima
 }
 
 void AnimationNodeBlendTreeEditor::_node_renamed_focus_out(Node *le, Ref<AnimationNode> p_node) {
+	if (le == nullptr) {
+		return; // The text_submitted signal triggered the graph update and freed the LineEdit.
+	}
 	_node_renamed(le->call("get_text"), p_node);
 }