[Bf-blender-cvs] [8ae74ec] master: Fix null-pointer free
Campbell Barton
noreply at git.blender.org
Tue Jun 21 21:29:28 CEST 2016
Commit: 8ae74ece9a38ac7e7c49e2ba61c103c395fc31ff
Author: Campbell Barton
Date: Wed Jun 22 05:34:04 2016 +1000
Branches: master
https://developer.blender.org/rB8ae74ece9a38ac7e7c49e2ba61c103c395fc31ff
Fix null-pointer free
Own error in recent decimeter commit
===================================================================
M source/blender/bmesh/intern/bmesh_polygon.c
M source/blender/bmesh/tools/bmesh_decimate_collapse.c
===================================================================
diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c
index 79051a2..fff6bea 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 acb220b..b4e8bb0 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);
}
More information about the Bf-blender-cvs
mailing list