Fix: crash creating a BMesh when some UV selection layers are missing

Error in !138197, while all UV selection layers should exist,
don't crash if some are missing.
This commit is contained in:
Campbell Barton
2025-10-08 11:15:12 +11:00
parent 0155ad92a4
commit a6a8fc9619

View File

@@ -443,7 +443,8 @@ void BM_mesh_bm_from_me(BMesh *bm, const Mesh *mesh, const BMeshFromMeshParams *
AttrDomain::Corner);
const VArraySpan uv_select_face = *attributes.lookup<bool>(".uv_select_face", AttrDomain::Face);
const bool need_uv_select = is_new && (!uv_select_vert.is_empty() && !uv_select_vert.is_empty());
const bool need_uv_select = is_new && (!uv_select_vert.is_empty() &&
!uv_select_edge.is_empty() && !uv_select_face.is_empty());
const Span<float3> positions = mesh->vert_positions();
Array<BMVert *> vtable(mesh->verts_num);