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:
authorGreg Neumiller <rlneumiller>2020-12-07 05:30:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-12-07 05:44:17 +0300
commitc2a01a6c118ed03fa48aa4f537fe9e5cf711b536 (patch)
treeb4bde580c570e4465f8fee809266ea715c758fbc
parentfff0032a25710da0fb8497f882c9a24a827d9089 (diff)
Fix T83347: Smart UV project crashes with wire edges
Missing NULL check. Regression in 9296ba867462f7ff3c55bc0c9129af4121243bed Ref D9757
-rw-r--r--source/blender/editors/uvedit/uvedit_islands.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/source/blender/editors/uvedit/uvedit_islands.c b/source/blender/editors/uvedit/uvedit_islands.c
index 8a8259d335a..93948b5ae1b 100644
--- a/source/blender/editors/uvedit/uvedit_islands.c
+++ b/source/blender/editors/uvedit/uvedit_islands.c
@@ -144,18 +144,20 @@ static float (*bm_face_array_calc_unique_uv_coords(
BMEdge *e_first = v_pivot->e;
const BMEdge *e = e_first;
do {
- const BMLoop *l_radial = e->l;
- do {
- if (l_radial->v == l_iter->v) {
- if (BM_elem_flag_test(l_radial, BM_ELEM_TAG)) {
- const MLoopUV *luv_radial = BM_ELEM_CD_GET_VOID_P(l_radial, cd_loop_uv_offset);
- if (equals_v2v2(luv->uv, luv_radial->uv)) {
- /* Don't add this UV when met in another face in `faces`. */
- BM_elem_flag_disable(l_iter, BM_ELEM_TAG);
+ if (e->l != NULL) {
+ const BMLoop *l_radial = e->l;
+ do {
+ if (l_radial->v == l_iter->v) {
+ if (BM_elem_flag_test(l_radial, BM_ELEM_TAG)) {
+ const MLoopUV *luv_radial = BM_ELEM_CD_GET_VOID_P(l_radial, cd_loop_uv_offset);
+ if (equals_v2v2(luv->uv, luv_radial->uv)) {
+ /* Don't add this UV when met in another face in `faces`. */
+ BM_elem_flag_disable(l_iter, BM_ELEM_TAG);
+ }
}
}
- }
- } while ((l_radial = l_radial->radial_next) != e->l);
+ } while ((l_radial = l_radial->radial_next) != e->l);
+ }
} while ((e = BM_DISK_EDGE_NEXT(e, v_pivot)) != e_first);
} while ((l_iter = l_iter->next) != l_first);
}