forked from bartvdbraak/blender
Fix T89269: Memory corruption during extrusions of overlapping edges
The "extrude" operator with the "use_dissolve_ortho_edges" option assumed the edges were connected.
This commit is contained in:
parent
157081069d
commit
354ecc2f1e
@ -459,8 +459,10 @@ void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op)
|
||||
}
|
||||
|
||||
/* Allocate array to store possible vertices that will be dissolved. */
|
||||
int boundary_verts_len = BMO_slot_map_count(dupeop.slots_out, "boundary_map.out");
|
||||
dissolve_verts = MEM_mallocN((size_t)boundary_verts_len * sizeof(*dissolve_verts), __func__);
|
||||
int boundary_edges_len = BMO_slot_map_count(dupeop.slots_out, "boundary_map.out");
|
||||
/* We do not know the real number of boundary vertices. */
|
||||
int boundary_verts_len_maybe = 2 * boundary_edges_len;
|
||||
dissolve_verts = MEM_mallocN(boundary_verts_len_maybe * sizeof(*dissolve_verts), __func__);
|
||||
}
|
||||
|
||||
BMO_slot_copy(&dupeop, slots_out, "geom.out", op, slots_out, "geom.out");
|
||||
|
Loading…
Reference in New Issue
Block a user