diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-05-01 17:11:55 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-05-01 17:11:55 +0300 |
commit | f84135ee655fa38b0a1347ef1e3139d938790a65 (patch) | |
tree | cdfc27c449024e156700cd22723c679d4b70e407 /source | |
parent | 535e75ea90f31d1d231e39dfdb14634563484679 (diff) |
Fix T44577: writing tessellated cddata when we should not...
Own mistake in rBf75c89b3f42ffac51603e6e53459f9d94a8782cc...
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 39096abf5fa..285c50a4049 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2008,7 +2008,9 @@ static void write_meshes(WriteData *wd, ListBase *idbase) * If we do not do that, we can get crash by buffer-overflow on reading, see T44461. */ CustomData_copy(&old_mesh->vdata, &mesh->vdata, CD_MASK_EVERYTHING, CD_REFERENCE, mesh->totvert); CustomData_copy(&old_mesh->edata, &mesh->edata, CD_MASK_EVERYTHING, CD_REFERENCE, mesh->totedge); +#ifndef USE_BMESH_SAVE_WITHOUT_MFACE /* Do not copy org fdata in this case!!! */ CustomData_copy(&old_mesh->fdata, &mesh->fdata, CD_MASK_EVERYTHING, CD_REFERENCE, mesh->totface); +#endif CustomData_copy(&old_mesh->ldata, &mesh->ldata, CD_MASK_EVERYTHING, CD_REFERENCE, mesh->totloop); CustomData_copy(&old_mesh->pdata, &mesh->pdata, CD_MASK_EVERYTHING, CD_REFERENCE, mesh->totpoly); @@ -2030,7 +2032,9 @@ static void write_meshes(WriteData *wd, ListBase *idbase) CustomData_free(&mesh->vdata, mesh->totvert); CustomData_free(&mesh->edata, mesh->totedge); +#ifndef USE_BMESH_SAVE_WITHOUT_MFACE CustomData_free(&mesh->fdata, mesh->totface); +#endif CustomData_free(&mesh->ldata, mesh->totloop); CustomData_free(&mesh->pdata, mesh->totpoly); |