mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:29:55 +00:00
Reset rcPolyMeshDetail members after rcFree
To avoid double free causing by later recastnavigation versions.
This commit is contained in:
parent
d5f5e53714
commit
c71862a8df
1 changed files with 3 additions and 0 deletions
|
@ -43,8 +43,11 @@ namespace DetourNavigator
|
||||||
void freePolyMeshDetail(rcPolyMeshDetail& value) noexcept
|
void freePolyMeshDetail(rcPolyMeshDetail& value) noexcept
|
||||||
{
|
{
|
||||||
rcFree(value.meshes);
|
rcFree(value.meshes);
|
||||||
|
value.meshes = nullptr;
|
||||||
rcFree(value.verts);
|
rcFree(value.verts);
|
||||||
|
value.verts = nullptr;
|
||||||
rcFree(value.tris);
|
rcFree(value.tris);
|
||||||
|
value.tris = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void copyPolyMesh(const rcPolyMesh& src, rcPolyMesh& dst)
|
void copyPolyMesh(const rcPolyMesh& src, rcPolyMesh& dst)
|
||||||
|
|
Loading…
Reference in a new issue