diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-03 06:11:38 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-03 06:11:38 +0400 |
commit | 243131edc05dc2ac09fb5386483bf103a403ad90 (patch) | |
tree | d359d951a0b3de60a659a34bbb24b6ed918d7677 /source | |
parent | d74c56423517de6db8ef1a1b3a74e0b1c8fc1dc6 (diff) |
fix for derived mesh buffer overrun caused by using an incorrect loop length.
editmode extruding would crash instantly when dupli-faces were enabled.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index acec42ee761..6ff3b20049c 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -135,7 +135,7 @@ static MLoop *dm_getLoopArray(DerivedMesh *dm) if (!mloop) { mloop = CustomData_add_layer(&dm->loopData, CD_MLOOP, CD_CALLOC, NULL, - dm->numLoopData); + dm->getNumLoops(dm)); CustomData_set_layer_flag(&dm->loopData, CD_MLOOP, CD_FLAG_TEMPORARY); dm->copyLoopArray(dm, mloop); } @@ -365,8 +365,8 @@ void DM_to_mesh(DerivedMesh *dm, Mesh *me, Object *ob) totvert = tmp.totvert = dm->getNumVerts(dm); totedge = tmp.totedge = dm->getNumEdges(dm); + totloop = tmp.totloop = dm->getNumLoops(dm); totpoly = tmp.totpoly = dm->getNumPolys(dm); - totloop = tmp.totloop = dm->numLoopData; CustomData_copy(&dm->vertData, &tmp.vdata, CD_MASK_MESH, CD_DUPLICATE, totvert); CustomData_copy(&dm->edgeData, &tmp.edata, CD_MASK_MESH, CD_DUPLICATE, totedge); |