diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-05-12 13:58:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-05-12 14:00:08 +0300 |
commit | 86b509229f0660c581c1558facad51dbca5621e9 (patch) | |
tree | d3ef99df769e3640ab4bbfe1bda7dc598496f676 /source/blender/bmesh/tools | |
parent | 8d3f367c0157799d8beb778bec443c2ffa6bffca (diff) |
Fix T48413: editmesh intersect tool crash
Its important to add tri-edge intersections from both sides.
Diffstat (limited to 'source/blender/bmesh/tools')
-rw-r--r-- | source/blender/bmesh/tools/bmesh_intersect.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/bmesh/tools/bmesh_intersect.c b/source/blender/bmesh/tools/bmesh_intersect.c index 70143586b99..9d1f7fa45d2 100644 --- a/source/blender/bmesh/tools/bmesh_intersect.c +++ b/source/blender/bmesh/tools/bmesh_intersect.c @@ -771,16 +771,13 @@ static void bm_isect_tri_tri( continue; iv = bm_isect_edge_tri(s, fv_b[i_e0], fv_b[i_e1], fv_a, a_index, f_a_cos, f_a_nor, &side); if (iv) { - /* check this wasn't handled above */ - if (!(side >= IX_EDGE_TRI_EDGE0 && side <= IX_EDGE_TRI_EDGE2)) { - BLI_assert(BLI_array_findindex((void **)iv_ls_a, STACK_SIZE(iv_ls_a), iv) == -1); - BLI_assert(BLI_array_findindex((void **)iv_ls_b, STACK_SIZE(iv_ls_b), iv) == -1); - STACK_PUSH(iv_ls_a, iv); - STACK_PUSH(iv_ls_b, iv); + BLI_assert(BLI_array_findindex((void **)iv_ls_a, STACK_SIZE(iv_ls_a), iv) == -1); + BLI_assert(BLI_array_findindex((void **)iv_ls_b, STACK_SIZE(iv_ls_b), iv) == -1); + STACK_PUSH(iv_ls_a, iv); + STACK_PUSH(iv_ls_b, iv); #ifdef USE_DUMP - printf(" ('EDGE-TRI-B', %d),\n", side); + printf(" ('EDGE-TRI-B', %d),\n", side); #endif - } } } } |