Commit: 2f0dbdea4f3f6c5c5e3e8227cb3aa99e1bf7eefd
Author: Howard Trickey
Date:   Fri Feb 8 09:24:43 2019 -0500
Branches: master
https://developer.blender.org/rB2f0dbdea4f3f6c5c5e3e8227cb3aa99e1bf7eefd

Bevel, fix crash when adjust offsets with inner arc miter.

Previous assumptions about boundary verts always being attached
to edges are now false.

===================================================================

M       source/blender/bmesh/tools/bmesh_bevel.c

===================================================================

diff --git a/source/blender/bmesh/tools/bmesh_bevel.c 
b/source/blender/bmesh/tools/bmesh_bevel.c
index e661edc74b0..4d96f49d798 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -2843,11 +2843,15 @@ static void adjust_offsets(BevelParams *bp)
                        v = vchainstart = vanchor;
                        iscycle = false;
                        while (v->eon && !v->visited && !iscycle) {
+                               v->visited = true;
+                               if (!v->efirst)
+                                       break;
                                enext = find_other_end_edge_half(bp, v->efirst, 
&bvcur);
+                               if (!enext)
+                                       break;
                                BLI_assert(enext != NULL);
                                vnext = enext->leftv;
                                v->adjchain = vnext;
-                               v->visited = true;
                                if (vnext->visited) {
                                        if (vnext != vchainstart) {
                                                break;
@@ -2862,12 +2866,15 @@ static void adjust_offsets(BevelParams *bp)
                                v = vchainstart;
                                bvcur = bv;
                                do {
+                                       v->visited = true;
+                                       if (!v->elast)
+                                               break;
                                        enext = find_other_end_edge_half(bp, 
v->elast, &bvcur);
-                                       BLI_assert(enext != NULL);
+                                       if (!enext)
+                                               break;
                                        vnext = enext->rightv;
                                        vnext->adjchain = v;
                                        vchainstart = vnext;
-                                       v->visited = true;
                                        v = vnext;
                                } while (!v->visited && v->eon);
                                adjust_the_cycle_or_chain(vchainstart, false);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to