BMesh: correct bmesh_edge_vert_swap
authorCampbell Barton <ideasman42@gmail.com>
Thu, 30 Apr 2015 20:51:16 +0000 (06:51 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 30 Apr 2015 20:51:16 +0000 (06:51 +1000)
Missed swapping out loops.

source/blender/bmesh/intern/bmesh_structure.c

index 5bc36cefad2efa4ad0e886ef6375a98285c04924..cb302139a4cf5ee01ec2de0b0f1f451be9fd4dec 100644 (file)
@@ -70,6 +70,12 @@ void bmesh_edge_vert_swap(BMEdge *e, BMVert *v_dst, BMVert *v_src)
                        if (l_iter->v == v_src) {
                                l_iter->v = v_dst;
                        }
+                       else if (l_iter->next->v == v_src) {
+                               l_iter->next->v = v_dst;
+                       }
+                       else {
+                               BLI_assert(l_iter->prev->v != v_src);
+                       }
                } while ((l_iter = l_iter->radial_next) != l_first);
        }