diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2019-09-04 18:18:25 +0200 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2019-09-04 18:18:25 +0200 |
commit | b01d07e0496397697c904db71d58f248c30d1123 (patch) | |
tree | 574a25679589aad871a542e1bb0db202bfa8ecb0 /editor/plugins | |
parent | 604dc426d57f3a525060b9bb4c37d89c470cff15 (diff) |
Fixed switching back to animation player editor with no animation to select
Fixes #31959
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 173079b6de..bc5d346780 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(); + } } } } |