fix for merged bridge crashing on closed loops (own bug in recent commit)
authorCampbell Barton <ideasman42@gmail.com>
Fri, 24 Aug 2012 16:55:25 +0000 (16:55 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 24 Aug 2012 16:55:25 +0000 (16:55 +0000)
source/blender/bmesh/operators/bmo_connect.c

index c9a0d74de3836bf2a675a40117a4f7f379e5e656..5b317aebbf03b4fb50fd91ba758548ba744590e9 100644 (file)
@@ -429,8 +429,7 @@ void bmo_bridge_loops_exec(BMesh *bm, BMOperator *op)
                
                /* merge loops of bridge faces */
                if (use_merge) {
-                       /* at the moment these will be the same */
-                       const int vert_len = mini(BLI_array_count(vv1), BLI_array_count(vv2));
+                       const int vert_len = mini(BLI_array_count(vv1), BLI_array_count(vv2)) - ((cl1 || cl2) ? 1 : 0);
                        const int edge_len = mini(BLI_array_count(ee1), BLI_array_count(ee2));
 
                        if (merge_factor <= 0.0f) {