diff options
author | Relintai <relintai@gmail.com> | 2019-10-02 22:49:34 +0200 |
---|---|---|
committer | Relintai <relintai@gmail.com> | 2019-10-03 00:00:01 +0200 |
commit | c6e577fed9d4ecfe5a026264db715fc3cd5443c8 (patch) | |
tree | 447c408cf402db2307c4c24d6fb15d68a15ba227 | |
parent | 893ebd3080225eeeecd4b52920df99d5c53484f7 (diff) |
Fix crash in #32473. (Automatically seek timeline in selected animation)
-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; |