diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp index e7ab6cde8a0..77bf7037061 100644 --- a/scene/3d/navigation.cpp +++ b/scene/3d/navigation.cpp @@ -35,6 +35,7 @@ void Navigation::_navmesh_link(int p_id) { ERR_FAIL_COND(!navmesh_map.has(p_id)); NavMesh &nm = navmesh_map[p_id]; ERR_FAIL_COND(nm.linked); + ERR_FAIL_COND(nm.navmesh.is_null()); PoolVector vertices = nm.navmesh->get_vertices(); int len = vertices.size();