diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-29 20:26:39 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-29 20:26:39 +0400 |
commit | 07ccd3ee3f9700730a60013a66b09466af2585d3 (patch) | |
tree | 5794ab3a7d76889f291dc1a3ecf00a2cbff9ef85 /source/blender/bmesh/operators/bmo_removedoubles.c | |
parent | f1745706adcd2337fe183e30c1b026a05c198839 (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/operators/bmo_removedoubles.c')
-rw-r--r-- | source/blender/bmesh/operators/bmo_removedoubles.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/bmesh/operators/bmo_removedoubles.c b/source/blender/bmesh/operators/bmo_removedoubles.c index d27a90f0366..87e26f11d4b 100644 --- a/source/blender/bmesh/operators/bmo_removedoubles.c +++ b/source/blender/bmesh/operators/bmo_removedoubles.c @@ -136,7 +136,7 @@ void bmo_weld_verts_exec(BMesh *bm, BMOperator *op) BMO_elem_flag_enable(bm, e, EDGE_COL); } else if (!BM_edge_exists(v, v2)) { - BM_edge_create(bm, v, v2, e, TRUE); + BM_edge_create(bm, v, v2, e, BM_CREATE_NO_DOUBLE); } BMO_elem_flag_enable(bm, e, ELE_DEL); @@ -214,7 +214,7 @@ void bmo_weld_verts_exec(BMesh *bm, BMOperator *op) v2 = BMO_slot_map_elem_get(slot_targetmap, v2); } - f2 = BM_face_create_ngon(bm, v, v2, edges, a, TRUE); + f2 = BM_face_create_ngon(bm, v, v2, edges, a, BM_CREATE_NO_DOUBLE); if (f2 && (f2 != f)) { BM_elem_attrs_copy(bm, bm, f, f2); |