Fix T72071: Crash on snap to edge

Caused when the vertices index is dirty due to some mesh editing
operation like Extrude
This commit is contained in:
Germano Cavalcante 2019-12-02 10:30:37 -03:00 committed by Sergey Sharybin
parent bdfcee347e
commit 4a440ecb99
Notes: blender-bot 2023-02-14 04:31:04 +01:00
Referenced by issue #72071, Blender crashes upon moving extruded vertices/edges with edge snapping enabled
1 changed files with 1 additions and 1 deletions

View File

@ -1312,7 +1312,7 @@ static short snap_mesh_polygon(SnapObjectContext *sctx,
l_iter = l_first = BM_FACE_FIRST_LOOP(f);
if (snapdata->snap_to_flag & SCE_SNAP_MODE_EDGE) {
elem = SCE_SNAP_MODE_EDGE;
BM_mesh_elem_index_ensure(em->bm, BM_EDGE);
BM_mesh_elem_index_ensure(em->bm, BM_VERT | BM_EDGE);
BM_mesh_elem_table_ensure(em->bm, BM_VERT | BM_EDGE);
do {
cb_snap_edge(&nearest2d,