Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-01-23 16:39:50 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-01-23 16:39:50 +0300
commitfb0136f908652a0fef93c6007f127fd322282c88 (patch)
tree65b8ae31a5c185caf796f3d2dca990614fb72597 /source/blender/bmesh
parent1f6ab32196d7cdd78e55f51ccc4304994b78b5c0 (diff)
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.
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/operators/bmo_subdivide_edgering.c5
1 files changed, 5 insertions, 0 deletions
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;
}