[Bf-blender-cvs] [c2a01a6c118] master: Fix T83347: Smart UV project crashes with wire edges
Greg Neumiller
noreply at git.blender.org
Mon Dec 7 04:21:13 CET 2020
Commit: c2a01a6c118ed03fa48aa4f537fe9e5cf711b536
Author: Greg Neumiller
Date: Mon Dec 7 13:30:05 2020 +1100
Branches: master
https://developer.blender.org/rBc2a01a6c118ed03fa48aa4f537fe9e5cf711b536
Fix T83347: Smart UV project crashes with wire edges
Missing NULL check.
Regression in 9296ba867462f7ff3c55bc0c9129af4121243bed
Ref D9757
===================================================================
M source/blender/editors/uvedit/uvedit_islands.c
===================================================================
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);
}
More information about the Bf-blender-cvs
mailing list