From c6e577fed9d4ecfe5a026264db715fc3cd5443c8 Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 2 Oct 2019 22:49:34 +0200 Subject: Fix crash in #32473. (Automatically seek timeline in selected animation) --- editor/plugins/animation_player_editor_plugin.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'editor') 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 anim = player->get_animation(player->get_assigned_animation()); updating = true; -- cgit v1.2.3