diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-06-21 22:34:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-06-21 22:34:04 +0300 |
commit | 8ae74ece9a38ac7e7c49e2ba61c103c395fc31ff (patch) | |
tree | c04dce39259ce19b92dfd9a743e96b651725ef91 /source/blender | |
parent | e783fddc0167eeb58bd69ed08ff31d0746772ad6 (diff) |
Fix null-pointer free
Own error in recent decimeter commit
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_polygon.c | 1 | ||||
-rw-r--r-- | source/blender/bmesh/tools/bmesh_decimate_collapse.c | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index 79051a2490f..fff6bea044c 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -1036,6 +1036,7 @@ void BM_face_triangulate( const int quad_method, const int ngon_method, const bool use_tag, + /* use for ngons only! */ MemArena *pf_arena, /* use for MOD_TRIANGULATE_NGON_BEAUTY only! */ diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c index acb220bdf21..b4e8bb06afe 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c +++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c @@ -603,9 +603,8 @@ static bool bm_decim_triangulate_begin(BMesh *bm, int *r_edges_tri_tot) faces_double = next; } - BLI_memarena_free(pf_arena); - if (has_ngon) { + BLI_memarena_free(pf_arena); BLI_heap_free(pf_heap, NULL); BLI_edgehash_free(pf_ehash, NULL); } |