diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-22 18:22:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-22 18:23:25 +0300 |
commit | 76ece90d4a441a366614ef3dec6575f9b687384c (patch) | |
tree | ce626f88384094cbafbde791f3f0b499ff8d1764 /source/blender/bmesh/operators/bmo_triangulate.c | |
parent | 28c20fc3934b404cbce8a9181ae536803abf9444 (diff) |
Fix T55093: Bisect + fill crash
Diffstat (limited to 'source/blender/bmesh/operators/bmo_triangulate.c')
-rw-r--r-- | source/blender/bmesh/operators/bmo_triangulate.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/bmesh/operators/bmo_triangulate.c b/source/blender/bmesh/operators/bmo_triangulate.c index 2cdc2646649..163a9ef599c 100644 --- a/source/blender/bmesh/operators/bmo_triangulate.c +++ b/source/blender/bmesh/operators/bmo_triangulate.c @@ -252,7 +252,7 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op) BM_ITER_MESH_MUTABLE (e, e_next, &iter, bm, BM_EDGES_OF_MESH) { if (BMO_edge_flag_test(bm, e, ELE_NEW)) { /* in rare cases the edges face will have already been removed from the edge */ - if (LIKELY(e->l)) { + if (LIKELY(BM_edge_is_manifold(e))) { BMFace *f_new = BM_faces_join_pair(bm, e->l, e->l->radial_next, false); if (f_new) { BMO_face_flag_enable(bm, f_new, ELE_NEW); @@ -262,9 +262,13 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op) BMO_error_clear(bm); } } - else { + else if (e->l == NULL) { BM_edge_kill(bm, e); } + else { + /* Edges with 1 or 3+ faces attached, + * most likely caused by a degeneratge mesh. */ + } } } } |