Fix #133073: Overlay-Next: Meshes without UVs crashes the UV Editor
Add missing check for has_active_edit_uvmap.
This commit is contained in:
@@ -715,11 +715,18 @@ class MeshUVs : Overlay {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResourceHandle res_handle = manager.unique_handle(ob_ref);
|
|
||||||
|
|
||||||
Object &ob = *ob_ref.object;
|
Object &ob = *ob_ref.object;
|
||||||
Mesh &mesh = *static_cast<Mesh *>(ob.data);
|
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) {
|
if (show_uv_edit) {
|
||||||
gpu::Batch *geom = DRW_mesh_batch_cache_get_edituv_edges(ob, mesh);
|
gpu::Batch *geom = DRW_mesh_batch_cache_get_edituv_edges(ob, mesh);
|
||||||
edges_ps_.draw_expand(geom, GPU_PRIM_TRIS, 2, 1, res_handle);
|
edges_ps_.draw_expand(geom, GPU_PRIM_TRIS, 2, 1, res_handle);
|
||||||
|
|||||||
Reference in New Issue
Block a user