From c28efd6c955e29c124d0e3345bd36155d233dee2 Mon Sep 17 00:00:00 2001 From: Valerii Date: Wed, 22 Jun 2022 16:36:52 +1000 Subject: Validate AnimationNode name in AnimationStateMachine Fixes #60959. --- editor/plugins/animation_state_machine_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'editor') diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index 2ba2466646..106aeba979 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -1018,7 +1018,7 @@ void AnimationNodeStateMachineEditor::_add_animation_type(int p_index) { anim->set_animation(animations_to_add[p_index]); - String base_name = animations_to_add[p_index]; + String base_name = animations_to_add[p_index].validate_node_name(); int base = 1; String name = base_name; while (state_machine->has_node(name)) { -- cgit v1.2.3