Fix null-pointer free
Own error in recent decimeter commit
This commit is contained in:
@@ -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! */
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user