Fix BMesh memory leak w/ multires data
This commit is contained in:
parent
23344bca6c
commit
534c0af4d3
|
@ -247,6 +247,9 @@ static BMLoop *bm_loop_create(
|
|||
|
||||
if (!(create_flag & BM_CREATE_SKIP_CD)) {
|
||||
if (l_example) {
|
||||
/* no need to copy attrs, just handle customdata */
|
||||
// BM_elem_attrs_copy(bm, bm, l_example, l);
|
||||
CustomData_bmesh_free_block_data(&bm->ldata, l->head.data);
|
||||
CustomData_bmesh_copy_data(&bm->ldata, &bm->ldata, l_example->head.data, &l->head.data);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -1095,6 +1095,8 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op)
|
|||
InterpFace *iface = iface_array[BM_elem_index_get(es->l->f)];
|
||||
const int i_a = BM_elem_index_get(l_a_other);
|
||||
const int i_b = BM_elem_index_get(l_b_other);
|
||||
CustomData_bmesh_free_block_data(&bm->ldata, l_b->head.data);
|
||||
CustomData_bmesh_free_block_data(&bm->ldata, l_a->head.data);
|
||||
CustomData_bmesh_copy_data(&bm->ldata, &bm->ldata, iface->blocks_l[i_a], &l_b->head.data);
|
||||
CustomData_bmesh_copy_data(&bm->ldata, &bm->ldata, iface->blocks_l[i_b], &l_a->head.data);
|
||||
|
||||
|
|
Loading…
Reference in New Issue