diff options
-rw-r--r-- | scene/3d/navigation_agent_3d.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/navigation_agent_3d.cpp b/scene/3d/navigation_agent_3d.cpp index 63a2ff5534..485ffde185 100644 --- a/scene/3d/navigation_agent_3d.cpp +++ b/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); } |