Alembic export: fixed memory leak
If the triangulated mesh was in itself a new mesh that should be freed this should happen before the function returns (as it only returns a single mesh, and thus the caller can only free one).
This commit is contained in:
parent
2124f3107c
commit
9fed39c7b0
|
@ -550,6 +550,10 @@ Mesh *AbcMeshWriter::getFinalMesh(bool &r_needsfree)
|
|||
Mesh *result = BKE_mesh_from_bmesh_for_eval_nomain(bm, 0);
|
||||
BM_mesh_free(bm);
|
||||
|
||||
if (r_needsfree) {
|
||||
BKE_id_free(NULL, mesh);
|
||||
}
|
||||
|
||||
mesh = result;
|
||||
r_needsfree = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue