From be409d446c5d34d41d35c1ca9f7ec82547a152e5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 15 May 2013 05:56:49 +0000 Subject: fix for own recent change with normal calculation (with no faces it wasn't freeing 0 byte allocation). --- source/blender/bmesh/operators/bmo_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/bmesh/operators/bmo_utils.c b/source/blender/bmesh/operators/bmo_utils.c index 2a8c8c8e2cd..14870dc918a 100644 --- a/source/blender/bmesh/operators/bmo_utils.c +++ b/source/blender/bmesh/operators/bmo_utils.c @@ -311,7 +311,7 @@ void bmo_recalc_face_normals_exec(BMesh *bm, BMOperator *op) BMIter liter, liter2; BMOIter siter; BMFace *f, *startf; - BMFace **fstack = MEM_mallocN(sizeof(*fstack) * BMO_slot_buffer_count(op->slots_in, "faces"), __func__); + BMFace **fstack; STACK_DECLARE(fstack); BMLoop *l, *l2; float maxx, maxx_test, cent[3]; @@ -358,7 +358,7 @@ void bmo_recalc_face_normals_exec(BMesh *bm, BMOperator *op) * have the same winding. this is done recursively, using a manual * stack (if we use simple function recursion, we'd end up overloading * the stack on large meshes). */ - + fstack = MEM_mallocN(sizeof(*fstack) * BMO_slot_buffer_count(op->slots_in, "faces"), __func__); STACK_INIT(fstack); STACK_PUSH(fstack, startf); BMO_elem_flag_enable(bm, startf, FACE_VIS); -- cgit v1.2.3