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:
authorCampbell Barton <ideasman42@gmail.com>2019-02-05 05:25:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-05 05:30:07 +0300
commitaf2d2d4dff77a1436b26007b5aa183075d91d537 (patch)
treea1661913ca26dbe0248af96a860ae80dada9310b /source/blender/bmesh/operators/bmo_dupe.c
parent445433a6913fb95fe04bf69089710cab877a581b (diff)
Fix T58221: Spin tool w/ merge first/last crashes
Spinning geometry that included non boundary/wire edges crashed when merge first/last enabled.
Diffstat (limited to 'source/blender/bmesh/operators/bmo_dupe.c')
-rw-r--r--source/blender/bmesh/operators/bmo_dupe.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/bmesh/operators/bmo_dupe.c b/source/blender/bmesh/operators/bmo_dupe.c
index 5129212f49b..3a07c81129f 100644
--- a/source/blender/bmesh/operators/bmo_dupe.c
+++ b/source/blender/bmesh/operators/bmo_dupe.c
@@ -550,13 +550,14 @@ void bmo_spin_exec(BMesh *bm, BMOperator *op)
if (elem_array[i]->head.htype == BM_EDGE) {
BMEdge *e_src = (BMEdge *)elem_array[i];
BMEdge *e_dst = BM_edge_find_double(e_src);
- BM_edge_splice(bm, e_dst, e_src);
- elem_array_len--;
- elem_array[i] = elem_array[elem_array_len];
- }
- else {
- i++;
+ if (e_dst != NULL) {
+ BM_edge_splice(bm, e_dst, e_src);
+ elem_array_len--;
+ elem_array[i] = elem_array[elem_array_len];
+ continue;
+ }
}
+ i++;
}
/* Full copies of faces may cause overlap. */
for (int i = 0; i < elem_array_len; ) {