Reset rcPolyMeshDetail members after rcFree

To avoid double free causing by later recastnavigation versions.
iwyu_full
elsid 2 years ago
parent d5f5e53714
commit c71862a8df
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

@ -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)

Loading…
Cancel
Save