diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-20 09:50:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-20 09:50:36 +0300 |
commit | f7d216c1b6061260ffba4fc63a2ff45f212d213f (patch) | |
tree | 1e4ff4f48183992845a03c4c0bfa7ad4c4499119 /source | |
parent | 306bc5fd1aa3e5eab20dea0ce9134c36df4ca815 (diff) |
Fix T59074: BMesh intersect hangs
This is a degenerate intersection, exit early instead of hanging.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_polygon_edgenet.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_polygon_edgenet.c b/source/blender/bmesh/intern/bmesh_polygon_edgenet.c index 4703dbf3bcd..53874e4ed96 100644 --- a/source/blender/bmesh/intern/bmesh_polygon_edgenet.c +++ b/source/blender/bmesh/intern/bmesh_polygon_edgenet.c @@ -1162,7 +1162,16 @@ static BMVert *bm_face_split_edgenet_partial_connect(BMesh *bm, BMVert *v_delimi BM_elem_flag_enable(v_split, VERT_NOT_IN_STACK); BLI_assert(v_delimit->e != NULL); + + /* Degenerate, avoid eternal loop, see: T59074. */ +#if 0 BLI_assert(v_split->e != NULL); +#else + if (UNLIKELY(v_split->e == NULL)) { + BM_vert_kill(bm, v_split); + v_split = NULL; + } +#endif } /* Restore flags */ |