diff options
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_smart_stitch.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_smart_stitch.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index e1b2d87c4f2..97b4e8f3905 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -1162,7 +1162,7 @@ static int stitch_init(bContext *C, wmOperator *op) EDBM_index_arrays_init(em, 0, 0, 1); - RNA_BEGIN (op->ptr, itemptr, "selection") { + RNA_BEGIN(op->ptr, itemptr, "selection") { faceIndex = RNA_int_get(&itemptr, "face_index"); elementIndex = RNA_int_get(&itemptr, "element_index"); efa = EDBM_face_at_index(em, faceIndex); @@ -1178,13 +1178,13 @@ static int stitch_init(bContext *C, wmOperator *op) } else { BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { - i = 0; - BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) { + BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, i) { if (uvedit_uv_select_test(em, scene, l)) { UvElement *element = ED_uv_element_get(state->element_map, efa, l); - stitch_select_uv(element, state, 1); + if (element) { + stitch_select_uv(element, state, 1); + } } - i++; } } } |