mirror of
https://github.com/godotengine/godot.git
synced 2024-12-02 00:52:50 +00:00
Fix parameter validation when renaming in AnimationLibrary
This commit is contained in:
parent
d27f60f0e8
commit
bdfb3884ff
@ -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 New Issue
Block a user