Sanity check for gizmo drawer navmesh

This commit is contained in:
Antoine Pilote
2024-08-05 23:51:35 -04:00
parent ca1d17e058
commit b2bc19b8d0

View File

@@ -189,7 +189,10 @@ void GizmoDrawer::DrawNavMesh(Ref<Scene> scene, bool occluded)
}
auto [transform, navmesh] = scene->m_Registry.get<TransformComponent, NavMeshVolumeComponent>(e);
duDebugDrawNavMesh(&m_DebugDrawer, *navmesh.NavMeshData->GetNavMesh(), DU_DRAWNAVMESH_OFFMESHCONS);
if (navmesh.NavMeshData && navmesh.NavMeshData->IsValid())
{
duDebugDrawNavMesh(&m_DebugDrawer, *navmesh.NavMeshData->GetNavMesh(), DU_DRAWNAVMESH_OFFMESHCONS);
}
}
}