diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-05-12 08:08:45 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-05-12 08:08:45 +0400 |
commit | b6345616a7a450c88d3e0eed4f953fbcc225597e (patch) | |
tree | d6d50abc5ce046d6ffa920a4c9981fe8dd2c53cf /source/blender/bmesh/operators | |
parent | 9cd0c5f7fb8b92dda6d5f82c50b839e0dfe7f1e8 (diff) |
fix for 2 crashes in bridge tool mixing open/closed loops with different vertex counts.
Diffstat (limited to 'source/blender/bmesh/operators')
-rw-r--r-- | source/blender/bmesh/operators/bmo_bridge.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/bmesh/operators/bmo_bridge.c b/source/blender/bmesh/operators/bmo_bridge.c index 9995cf43c25..bf7c9f86df7 100644 --- a/source/blender/bmesh/operators/bmo_bridge.c +++ b/source/blender/bmesh/operators/bmo_bridge.c @@ -164,9 +164,11 @@ static void bridge_loop_pair(BMesh *bm, LinkData *el; for (el = BM_edgeloop_verts_get(estore_pair[i])->first; el; el = el->next) { LinkData *el_next = BM_EDGELOOP_NEXT(estore_pair[i], el); - BMEdge *e = BM_edge_exists(el->data, el_next->data); - if (e && BM_edge_is_boundary(e)) { - winding_votes += ((e->l->v == el->data) ? winding_dir : -winding_dir); + if (el_next) { + BMEdge *e = BM_edge_exists(el->data, el_next->data); + if (e && BM_edge_is_boundary(e)) { + winding_votes += ((e->l->v == el->data) ? winding_dir : -winding_dir); + } } } } @@ -318,7 +320,7 @@ static void bridge_loop_pair(BMesh *bm, if (l_1) BM_elem_attrs_copy(bm, bm, l_1, l_iter); l_iter = l_iter->next; if (l_2) BM_elem_attrs_copy(bm, bm, l_2, l_iter); l_iter = l_iter->next; - if (l_2_next) BM_elem_attrs_copy(bm, bm, l_1_next, l_iter); + if (l_1_next) BM_elem_attrs_copy(bm, bm, l_1_next, l_iter); } if (el_a_next == el_a_first) { |