diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-10-03 07:57:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-03 07:57:10 +0200 |
commit | 059a53ee1de5c86c08459a32d6537c4558d568d5 (patch) | |
tree | a8fdc28bb1eb533d2a1fffeb19b5f01169af3ac5 /editor | |
parent | ce336e7e72e64fe5babdee2760d332928d670907 (diff) | |
parent | c6e577fed9d4ecfe5a026264db715fc3cd5443c8 (diff) |
Merge pull request #32504 from Relintai/fix_empty_animatin_player_crash
Fix crash in #32473. (Automatically seek timeline in selected animation)
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 60ef88d2e3..75a7099ec4 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -1077,12 +1077,16 @@ void AnimationPlayerEditor::_animation_key_editor_seek(float p_pos, bool p_drag) if (!is_visible_in_tree()) return; + if (!player) return; if (player->is_playing()) return; + if (!player->has_animation(player->get_assigned_animation())) + return; + Ref<Animation> anim = player->get_animation(player->get_assigned_animation()); updating = true; |