diff --git a/scene/3d/navigation_agent.cpp b/scene/3d/navigation_agent.cpp index 4400b756b..4d2e4177e 100644 --- a/scene/3d/navigation_agent.cpp +++ b/scene/3d/navigation_agent.cpp @@ -205,7 +205,7 @@ void NavigationAgent::_notification(int p_what) { set_agent_parent(get_parent()); set_physics_process_internal(true); - if (avoidance_enabled) { + if (agent_parent && avoidance_enabled) { NavigationServer::get_singleton()->agent_set_position(agent, agent_parent->get_global_transform().origin); }