소스 검색

Fix crash in 'NavigationAgent3D', fixes #78910

Pawel Lampe 2 년 전
부모
커밋
fcbb521392
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      scene/3d/navigation_agent_3d.cpp

+ 1 - 1
scene/3d/navigation_agent_3d.cpp

@@ -220,7 +220,7 @@ void NavigationAgent3D::_notification(int p_what) {
 			set_agent_parent(get_parent());
 			set_physics_process_internal(true);
 
-			if (avoidance_enabled) {
+			if (agent_parent && avoidance_enabled) {
 				NavigationServer3D::get_singleton()->agent_set_position(agent, agent_parent->get_global_transform().origin);
 			}