diff options
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/operators/bmo_subdivide_edgering.c | 5 |
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; } |