diff options
author | Pawel Lampe <pawel.lampe@gmail.com> | 2023-07-02 11:32:14 +0200 |
---|---|---|
committer | Pawel Lampe <pawel.lampe@gmail.com> | 2023-07-02 22:30:03 +0200 |
commit | fcbb5213922829817b6ee76a15f1e4f7519b51d6 (patch) | |
tree | 4ce9acb0ed8491247b6ee510e12a7835269e4e8c | |
parent | 46424488edc341b65467ee7fd3ac423e4d49ad34 (diff) | |
download | redot-engine-fcbb5213922829817b6ee76a15f1e4f7519b51d6.tar.gz |
Fix crash in 'NavigationAgent3D', fixes #78910
-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); } |