diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-16 18:21:34 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-16 18:25:13 +0300 |
commit | 247d922ce5db05b74dc88947d4c816ffe6364d2c (patch) | |
tree | ab678f5c493f5a72921594230d2c368460d382b6 /source/blender/blenkernel/intern/mesh.c | |
parent | 3e3e7ee41c9c04ef1630eef46c71434d152c55dc (diff) |
Fix T45446: Crash when baking a certain object
Issue was caused by deform vert layer existing in the mesh.
Solved in quite simple way, but it still might be missing
some other layers.
Any custom data experts around to check if it's correct?
Diffstat (limited to 'source/blender/blenkernel/intern/mesh.c')
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 759e408067a..f7c2f194712 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -2262,6 +2262,10 @@ void BKE_mesh_split_faces(Mesh *mesh) sizeof(MVert) * mesh->totvert); 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); + CustomData_set_layer(&mesh->vdata, CD_MDEFORMVERT, mesh->dvert); + } CustomData_set_layer(&mesh->vdata, CD_MVERT, mesh->mvert); CustomData_set_layer(&mesh->edata, CD_MEDGE, mesh->medge); num_new_verts = 0; |