summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValerii <dtho47@yandex.ru>2022-06-22 16:36:52 +1000
committerRĂ©mi Verschelde <rverschelde@gmail.com>2022-07-28 10:16:45 +0200
commitc28efd6c955e29c124d0e3345bd36155d233dee2 (patch)
tree6948d9539b9a0d2b2c0aecbf799d9253151ebfc3
parentc18d0f20357a11bd9cfa2f57b8b9b500763413bc (diff)
Validate AnimationNode name in AnimationStateMachine
Fixes #60959.
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp2
1 files changed, 1 insertions, 1 deletions
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)) {