mirror of
https://projects.blender.org/blender/blender.git
synced 2025-01-22 15:32:15 -05:00
Fix #133073: Overlay-Next: Meshes without UVs crashes the UV Editor
Add missing check for has_active_edit_uvmap.
This commit is contained in:
parent
3fca91ad74
commit
1406b9e656
1 changed files with 9 additions and 2 deletions
|
@ -715,11 +715,18 @@ class MeshUVs : Overlay {
|
|||
return;
|
||||
}
|
||||
|
||||
ResourceHandle res_handle = manager.unique_handle(ob_ref);
|
||||
|
||||
Object &ob = *ob_ref.object;
|
||||
Mesh &mesh = *static_cast<Mesh *>(ob.data);
|
||||
|
||||
const bool has_active_edit_uvmap =
|
||||
(CustomData_get_active_layer(&mesh.runtime->edit_mesh->bm->ldata, CD_PROP_FLOAT2) != -1);
|
||||
|
||||
if (!has_active_edit_uvmap) {
|
||||
return;
|
||||
}
|
||||
|
||||
ResourceHandle res_handle = manager.unique_handle(ob_ref);
|
||||
|
||||
if (show_uv_edit) {
|
||||
gpu::Batch *geom = DRW_mesh_batch_cache_get_edituv_edges(ob, mesh);
|
||||
edges_ps_.draw_expand(geom, GPU_PRIM_TRIS, 2, 1, res_handle);
|
||||
|
|
Loading…
Reference in a new issue