Fix null-pointer free

Own error in recent decimeter commit
This commit is contained in:
2016-06-22 05:34:04 +10:00
parent e783fddc01
commit 8ae74ece9a
2 changed files with 2 additions and 2 deletions

View File

@@ -1036,6 +1036,7 @@ void BM_face_triangulate(
const int quad_method, const int quad_method,
const int ngon_method, const int ngon_method,
const bool use_tag, const bool use_tag,
/* use for ngons only! */
MemArena *pf_arena, MemArena *pf_arena,
/* use for MOD_TRIANGULATE_NGON_BEAUTY only! */ /* use for MOD_TRIANGULATE_NGON_BEAUTY only! */

View File

@@ -603,9 +603,8 @@ static bool bm_decim_triangulate_begin(BMesh *bm, int *r_edges_tri_tot)
faces_double = next; faces_double = next;
} }
BLI_memarena_free(pf_arena);
if (has_ngon) { if (has_ngon) {
BLI_memarena_free(pf_arena);
BLI_heap_free(pf_heap, NULL); BLI_heap_free(pf_heap, NULL);
BLI_edgehash_free(pf_ehash, NULL); BLI_edgehash_free(pf_ehash, NULL);
} }