diff --git a/components/detournavigator/recast.cpp b/components/detournavigator/recast.cpp index c1d14c0aa8..504de86b2d 100644 --- a/components/detournavigator/recast.cpp +++ b/components/detournavigator/recast.cpp @@ -43,8 +43,11 @@ namespace DetourNavigator void freePolyMeshDetail(rcPolyMeshDetail& value) noexcept { rcFree(value.meshes); + value.meshes = nullptr; rcFree(value.verts); + value.verts = nullptr; rcFree(value.tris); + value.tris = nullptr; } void copyPolyMesh(const rcPolyMesh& src, rcPolyMesh& dst)