You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Fix error msg when selecting popupmenu if there is no animation
This commit is contained in:
@@ -1102,9 +1102,12 @@ void AnimationPlayerEditor::_animation_about_to_show_menu() {
|
|||||||
|
|
||||||
void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
|
void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
|
||||||
|
|
||||||
String current = animation->get_item_text(animation->get_selected());
|
String current;
|
||||||
|
if (animation->get_selected() >= 0 && animation->get_selected() < animation->get_item_count())
|
||||||
|
current = animation->get_item_text(animation->get_selected());
|
||||||
|
|
||||||
Ref<Animation> anim;
|
Ref<Animation> anim;
|
||||||
if (current != "") {
|
if (current != String()) {
|
||||||
anim = player->get_animation(current);
|
anim = player->get_animation(current);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user