fix for incorrect selection when running MESH_OT_loop_to_region, running wire-frame operator directly after would crash.

This commit is contained in:
Campbell Barton 2013-06-27 05:19:25 +00:00
parent 3f2ecdcd42
commit ff39d7b4bf
2 changed files with 3 additions and 0 deletions

@ -80,6 +80,7 @@ static void bm_vert_boundary_tangent(BMVert *v, float r_no[3], float r_no_face[3
} }
if (e_a && e_b) { if (e_a && e_b) {
/* note, with an incorrectly flushed selection this can crash */
l_a = bm_edge_tag_faceloop(e_a); l_a = bm_edge_tag_faceloop(e_a);
l_b = bm_edge_tag_faceloop(e_b); l_b = bm_edge_tag_faceloop(e_b);

@ -3188,6 +3188,8 @@ static int edbm_loop_to_region_exec(bContext *C, wmOperator *op)
} }
} }
EDBM_selectmode_flush(em);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED; return OPERATOR_FINISHED;
} }