diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-07-25 13:50:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-07-25 13:50:38 +0300 |
commit | 790d3804d09602efbfa88d2f9d9f1b8cb4640918 (patch) | |
tree | 51f5cfcc00553de08a73a97aec6f4caed7e22aa3 /source/blender/editors | |
parent | 82db64ed80725e5c47e49811e0f9b59288bfa1c2 (diff) | |
parent | 4ca8f25fa86d770ff0fc237f57cfe58db35952eb (diff) |
Merge branch 'blender-v2.90-release'
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_path.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/source/blender/editors/uvedit/uvedit_path.c b/source/blender/editors/uvedit/uvedit_path.c index f72ddcdedd3..1c7da7af0f4 100644 --- a/source/blender/editors/uvedit/uvedit_path.c +++ b/source/blender/editors/uvedit/uvedit_path.c @@ -569,10 +569,12 @@ static int uv_shortest_path_pick_invoke(bContext *C, wmOperator *op, const wmEve } BMLoop *l_src = ED_uvedit_active_edge_loop_get(bm); - const MLoopUV *luv_src_v1 = BM_ELEM_CD_GET_VOID_P(l_src, cd_loop_uv_offset); - const MLoopUV *luv_src_v2 = BM_ELEM_CD_GET_VOID_P(l_src->next, cd_loop_uv_offset); - if ((luv_src_v1->flag & MLOOPUV_VERTSEL) == 0 && (luv_src_v2->flag & MLOOPUV_VERTSEL) == 0) { - l_src = NULL; + if (l_src != NULL) { + const MLoopUV *luv_src_v1 = BM_ELEM_CD_GET_VOID_P(l_src, cd_loop_uv_offset); + const MLoopUV *luv_src_v2 = BM_ELEM_CD_GET_VOID_P(l_src->next, cd_loop_uv_offset); + if ((luv_src_v1->flag & MLOOPUV_VERTSEL) == 0 && (luv_src_v2->flag & MLOOPUV_VERTSEL) == 0) { + l_src = NULL; + } } ele_src = (BMElem *)l_src; @@ -585,9 +587,11 @@ static int uv_shortest_path_pick_invoke(bContext *C, wmOperator *op, const wmEve } BMLoop *l_src = ED_uvedit_active_vert_loop_get(bm); - const MLoopUV *luv_src = BM_ELEM_CD_GET_VOID_P(l_src, cd_loop_uv_offset); - if ((luv_src->flag & MLOOPUV_VERTSEL) == 0) { - l_src = NULL; + if (l_src != NULL) { + const MLoopUV *luv_src = BM_ELEM_CD_GET_VOID_P(l_src, cd_loop_uv_offset); + if ((luv_src->flag & MLOOPUV_VERTSEL) == 0) { + l_src = NULL; + } } ele_src = (BMElem *)l_src; |