Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-11-29 20:26:39 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-29 20:26:39 +0400
commit07ccd3ee3f9700730a60013a66b09466af2585d3 (patch)
tree5794ab3a7d76889f291dc1a3ecf00a2cbff9ef85 /source/blender/bmesh/tools
parentf1745706adcd2337fe183e30c1b026a05c198839 (diff)
fix [#33029] Applying modifier leaks memory
Thanks for Sergey for finding the bug & patching, This fix works a bit differently. Theres no need to allocate the customdata in the first place - since its written into. So add a flag for vert/edge/face/loop creation functions so they can skip customdata creation.
Diffstat (limited to 'source/blender/bmesh/tools')
-rw-r--r--source/blender/bmesh/tools/bmesh_bevel.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index 62465ea9849..cb35616a1f7 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -164,7 +164,7 @@ static NewVert *mesh_vert(VMesh *vm, int i, int j, int k)
static void create_mesh_bmvert(BMesh *bm, VMesh *vm, int i, int j, int k, BMVert *eg)
{
NewVert *nv = mesh_vert(vm, i, j, k);
- nv->v = BM_vert_create(bm, nv->co, eg);
+ nv->v = BM_vert_create(bm, nv->co, eg, 0);
}
static void copy_mesh_vert(VMesh *vm, int ito, int jto, int kto,
@@ -267,9 +267,9 @@ static BMFace *bev_create_ngon(BMesh *bm, BMVert **vert_arr, const int totv, BMF
BLI_array_fixedstack_declare(ee, BM_DEFAULT_NGON_STACK_SIZE, totv, __func__);
for (i = 0; i < totv; i++) {
- ee[i] = BM_edge_create(bm, vert_arr[i], vert_arr[(i + 1) % totv], NULL, TRUE);
+ ee[i] = BM_edge_create(bm, vert_arr[i], vert_arr[(i + 1) % totv], NULL, BM_CREATE_NO_DOUBLE);
}
- f = BM_face_create_ngon(bm, vert_arr[0], vert_arr[1], ee, totv, FALSE);
+ f = BM_face_create_ngon(bm, vert_arr[0], vert_arr[1], ee, totv, 0);
BLI_array_fixedstack_free(ee);
}
if (facerep && f) {
@@ -1064,7 +1064,7 @@ static void bevel_build_rings(BMesh *bm, BevVert *bv)
}
} while ((v = v->next) != vm->boundstart);
mul_v3_fl(midco, 1.0f / nn);
- bmv = BM_vert_create(bm, midco, NULL);
+ bmv = BM_vert_create(bm, midco, NULL, 0);
v = vm->boundstart;
do {
i = v->index;