diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-10-16 09:24:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-10-16 09:24:55 +0400 |
commit | f12ac5b23f27882446ea6620216d9be863183e50 (patch) | |
tree | 1cf60417a634bb055fd83b38d850032a32f4d39b /source/blender/bmesh | |
parent | ecf2eeef231ea5b615232070209af308257d9bfb (diff) |
fix [#37100] Segfault when I rotate an edge
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/operators/bmo_utils.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/bmesh/operators/bmo_utils.c b/source/blender/bmesh/operators/bmo_utils.c index c89fee71cbc..600386893dd 100644 --- a/source/blender/bmesh/operators/bmo_utils.c +++ b/source/blender/bmesh/operators/bmo_utils.c @@ -145,19 +145,23 @@ void bmo_rotate_edges_exec(BMesh *bm, BMOperator *op) BMO_elem_flag_test(bm, fb, FACE_TAINT) == false) { + /* don't touch again (faces will be freed so run before rotating the edge) */ + BMO_elem_flag_enable(bm, fa, FACE_TAINT); + BMO_elem_flag_enable(bm, fb, FACE_TAINT); + if (!(e2 = BM_edge_rotate(bm, e, use_ccw, check_flag))) { + + BMO_elem_flag_disable(bm, fa, FACE_TAINT); + BMO_elem_flag_disable(bm, fb, FACE_TAINT); #if 0 BMO_error_raise(bm, op, BMERR_INVALID_SELECTION, "Could not rotate edge"); return; #endif + continue; } BMO_elem_flag_enable(bm, e2, EDGE_OUT); - - /* don't touch again */ - BMO_elem_flag_enable(bm, fa, FACE_TAINT); - BMO_elem_flag_enable(bm, fb, FACE_TAINT); } } } |