diff options
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 0991832eff..d7451849a1 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -690,8 +690,10 @@ void AnimationPlayerEditor::set_state(const Dictionary &p_state) { if (p_state.has("animation")) { String anim = p_state["animation"]; - _select_anim_by_name(anim); - _animation_edit(); + if (!anim.empty() && player->has_animation(anim)) { + _select_anim_by_name(anim); + _animation_edit(); + } } } } |