Fix for the previous commit: overallocation of an array

This commit is contained in:
Sergey Sharybin
2015-07-16 17:26:20 +02:00
parent 247d922ce5
commit 4feef7d4f8

View File

@@ -2263,7 +2263,7 @@ void BKE_mesh_split_faces(Mesh *mesh)
medge = mesh->medge = MEM_reallocN(mesh->medge,
sizeof(MEdge) * mesh->totedge);
if (mesh->dvert != NULL) {
mesh->dvert = MEM_reallocN(mesh->dvert, sizeof(MDeformVert) * mesh->totedge);
mesh->dvert = MEM_reallocN(mesh->dvert, sizeof(MDeformVert) * mesh->totvert);
CustomData_set_layer(&mesh->vdata, CD_MDEFORMVERT, mesh->dvert);
}
CustomData_set_layer(&mesh->vdata, CD_MVERT, mesh->mvert);