[Bf-blender-cvs] [fb0136f9086] blender-v2.82-release: Fix T71311 Bridge Edge Loops crash when bridging cube edges
Sybren A. Stüvel
noreply at git.blender.org
Thu Jan 23 14:40:59 CET 2020
Commit: fb0136f908652a0fef93c6007f127fd322282c88
Author: Sybren A. Stüvel
Date: Thu Jan 23 14:39:50 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rBfb0136f908652a0fef93c6007f127fd322282c88
Fix T71311 Bridge Edge Loops crash when bridging cube edges
This commit will prevent the crash. It does produce a result that may not
be desirable (only briding one face of the cube), but at least it's better
than crashing.
===================================================================
M source/blender/bmesh/operators/bmo_subdivide_edgering.c
===================================================================
diff --git a/source/blender/bmesh/operators/bmo_subdivide_edgering.c b/source/blender/bmesh/operators/bmo_subdivide_edgering.c
index f93d33bb05f..b9d5548f5d4 100644
--- a/source/blender/bmesh/operators/bmo_subdivide_edgering.c
+++ b/source/blender/bmesh/operators/bmo_subdivide_edgering.c
@@ -828,6 +828,11 @@ static void bm_face_slice(BMesh *bm, BMLoop *l, const int cuts)
for (i = 0; i < cuts; i++) {
/* no chance of double */
BM_face_split(bm, l_new->f, l_new->prev, l_new->next->next, &l_new, NULL, false);
+ if (l_new == NULL) {
+ /* This happens when l_new->prev and l_new->next->next are adjacent. Since
+ * this sets l_new to NULL, we cannot continue this for-loop. */
+ break;
+ }
if (l_new->f->len < l_new->radial_next->f->len) {
l_new = l_new->radial_next;
}
More information about the Bf-blender-cvs
mailing list