summaryrefslogtreecommitdiff
path: root/scene/3d/navigation_obstacle_3d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/navigation_obstacle_3d.cpp')
-rw-r--r--scene/3d/navigation_obstacle_3d.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/3d/navigation_obstacle_3d.cpp b/scene/3d/navigation_obstacle_3d.cpp
index f241d65649..6431bd2b77 100644
--- a/scene/3d/navigation_obstacle_3d.cpp
+++ b/scene/3d/navigation_obstacle_3d.cpp
@@ -122,6 +122,7 @@ NavigationObstacle3D::NavigationObstacle3D() {
}
NavigationObstacle3D::~NavigationObstacle3D() {
+ ERR_FAIL_NULL(NavigationServer3D::get_singleton());
NavigationServer3D::get_singleton()->free(agent);
agent = RID(); // Pointless
}