Fix parameter validation when renaming in AnimationLibrary
This commit is contained in:
parent
d27f60f0e8
commit
bdfb3884ff
1 changed files with 1 additions and 1 deletions
|
@ -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]);
|
||||
|
|
Loading…
Reference in a new issue