1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Merge pull request #31964 from nekomatata/fix-animation-player-error

Fixed switching back to AnimationPlayerEditor with empty animation list
This commit is contained in:
Rémi Verschelde
2019-09-19 20:32:05 +02:00
committed by GitHub

View File

@@ -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();
}
}
}
}