summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2022-04-13 19:08:13 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2022-04-13 22:14:47 +0800
commitbdfb3884ffc5f602ca6256d4c33fb10176a02246 (patch)
treefdeb406eda2254242393f88b6791775ec2179f12 /scene/resources
parentd27f60f0e8d78059f8d075e16f0d242a7673bba0 (diff)
Fix parameter validation when renaming in AnimationLibrary
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/animation_library.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/animation_library.cpp b/scene/resources/animation_library.cpp
index f7b8c6a648..229d9ab218 100644
--- a/scene/resources/animation_library.cpp
+++ b/scene/resources/animation_library.cpp
@@ -55,7 +55,7 @@ void AnimationLibrary::remove_animation(const StringName &p_name) {
void AnimationLibrary::rename_animation(const StringName &p_name, const StringName &p_new_name) {
ERR_FAIL_COND(!animations.has(p_name));
- ERR_FAIL_COND_MSG(String(p_name).contains("/") || String(p_name).contains(":") || String(p_name).contains(",") || String(p_name).contains("["), "Invalid animation name: " + String(p_name) + ".");
+ ERR_FAIL_COND_MSG(String(p_new_name).contains("/") || String(p_new_name).contains(":") || String(p_new_name).contains(",") || String(p_new_name).contains("["), "Invalid animation name: " + String(p_new_name) + ".");
ERR_FAIL_COND(animations.has(p_new_name));
animations.insert(p_new_name, animations[p_name]);