Fix #115170: Sculpt mode crash

If there isn't an evaluated mesh, use the original.
This commit is contained in:
Hans Goudey 2023-11-20 07:45:52 -05:00
parent 85ffb71e44
commit b63e31df57
1 changed files with 6 additions and 2 deletions

View File

@ -1065,8 +1065,12 @@ static void cursor_draw_tiling_preview(const uint gpuattr,
Object *ob,
const float radius)
{
const Mesh *mesh_eval = BKE_object_get_evaluated_mesh_no_subsurf(ob);
const blender::Bounds<blender::float3> bounds = *mesh_eval->bounds_min_max();
BLI_assert(ob->type == OB_MESH);
const Mesh *mesh = BKE_object_get_evaluated_mesh_no_subsurf(ob);
if (!mesh) {
mesh = static_cast<const Mesh *>(ob->data);
}
const blender::Bounds<blender::float3> bounds = *mesh->bounds_min_max();
float orgLoc[3], location[3];
int tile_pass = 0;
int start[3];