diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2012-05-03 14:56:35 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2012-05-03 14:56:35 +0400 |
commit | 3509daa1c1910bf1b2ce8fcbee2e5644b2b3d607 (patch) | |
tree | 54c5ff4685f125ca7dbb382f1acefe4b25e97981 /source/blender/editors/uvedit/uvedit_smart_stitch.c | |
parent | 56d22457e320df0bdcdcfd8d7af5e1958ddb201f (diff) |
Fix #31178, the cause is hidden and selected faces would return NULL as UVElements. To avoid checking the whole contingency of UV synch selection + face selection + face hidden, added a NULL check.
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_smart_stitch.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_smart_stitch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 183f75c6b42..9474ae95c34 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -1179,13 +1179,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++; } } } |