소스 검색

Merge pull request #32504 from Relintai/fix_empty_animatin_player_crash

Fix crash in #32473. (Automatically seek timeline in selected animation)
Rémi Verschelde 6 년 전
부모
커밋
059a53ee1d
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      editor/plugins/animation_player_editor_plugin.cpp

+ 4 - 0
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;