diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-04-07 04:43:50 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-04-07 04:47:28 +0300 |
commit | a0799ce33680ff9eea6afeb41b14a66db14f7a20 (patch) | |
tree | c793ddaec6eb56b8ec026e0b4375e052ccbcc0a5 /source/blender | |
parent | d426c335c597071beafc8313f58ecea3a2432bfe (diff) |
Fix T51137: Edge Rip Hangs
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_core.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c index cee5450a37d..4fe14fdf5c9 100644 --- a/source/blender/bmesh/intern/bmesh_core.c +++ b/source/blender/bmesh/intern/bmesh_core.c @@ -2403,15 +2403,20 @@ static void bmesh_kernel_vert_separate__cleanup(BMesh *bm, LinkNode *edges_separ do { LinkNode *n_orig = edges_separate->link; do { - BMEdge *e_orig = n_orig->link; + LinkNode *n_prev = n_orig; LinkNode *n_step = n_orig->next; + BMEdge *e_orig = n_orig->link; do { BMEdge *e = n_step->link; BLI_assert(e != e_orig); - if ((e->v1 == e_orig->v1) && (e->v2 == e_orig->v2)) { - BM_edge_splice(bm, e_orig, e); + if ((e->v1 == e_orig->v1) && (e->v2 == e_orig->v2) && + BM_edge_splice(bm, e_orig, e)) + { + /* don't visit again */ + n_prev->next = n_step->next; } - } while ((n_step = n_step->next)); + } while ((n_prev = n_step), + (n_step = n_step->next)); } while ((n_orig = n_orig->next) && n_orig->next); } while ((edges_separate = edges_separate->next)); |