Allocate/free meshes with generic library functions.

This avoids the need to use Mesh-specific functions, and makes allocation
and freeing easy oneliners.
This commit is contained in:
2018-05-03 15:42:55 +02:00
parent 4880e2e75a
commit d8a03c77d7
7 changed files with 29 additions and 47 deletions

View File

@@ -152,8 +152,7 @@ static void deformVertsEM(
}
if (!mesh) {
BKE_mesh_free(mesh_src);
MEM_freeN(mesh_src);
BKE_id_free(NULL, mesh_src);
}
}
@@ -173,8 +172,7 @@ static void deformMatricesEM(
amd->deformflag, NULL, amd->defgrp_name);
if (!mesh) {
BKE_mesh_free(mesh_src);
MEM_freeN(mesh_src);
BKE_id_free(NULL, mesh_src);
}
}