Fix error in BM_vert_is_edge_pair
authorCampbell Barton <ideasman42@gmail.com>
Wed, 23 Dec 2015 04:50:50 +0000 (15:50 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 23 Dec 2015 05:08:20 +0000 (16:08 +1100)
Returned true for verts with a single edge.

source/blender/bmesh/intern/bmesh_queries.c

index f8cc66fc0dfe8a98b4fdadef6b7fbfee35a1e9db..0c5f51b2b87fb965459745a7e62ad3aeefdc07a4 100644 (file)
@@ -768,8 +768,8 @@ bool BM_vert_is_edge_pair(const BMVert *v)
 {
        const BMEdge *e = v->e;
        if (e) {
-               const BMDiskLink *dl = bmesh_disk_edge_link_from_vert(e, v);
-               return (dl->next == dl->prev);
+               BMEdge *e_other = BM_DISK_EDGE_NEXT(e, v);
+               return ((e_other != e) && (BM_DISK_EDGE_NEXT(e_other, v) == e));
        }
        return false;
 }