diff --git a/scene/animation/animation_mixer.cpp b/scene/animation/animation_mixer.cpp index 0ab4dbe4701..1c5f40f56e5 100644 --- a/scene/animation/animation_mixer.cpp +++ b/scene/animation/animation_mixer.cpp @@ -81,9 +81,8 @@ bool AnimationMixer::_set(const StringName &p_name, const Variant &p_value) { List keys; d.get_key_list(&keys); for (const Variant &K : keys) { - StringName lib_name = K; - Ref lib = d[lib_name]; - add_animation_library(lib_name, lib); + Ref lib = d[K]; + add_animation_library(K, lib); } emit_signal(SNAME("animation_libraries_updated"));