From c6a48aecc85628fa6ca32fbe559476f661699ec4 Mon Sep 17 00:00:00 2001 From: Sean Kim Date: Sun, 14 Sep 2025 11:08:25 +0200 Subject: [PATCH] Fix #146233: Dyntopo sample detail size crashes with cursor not on mesh Introduced by 45d9bfa734aae456ca83953e56953fae94617151 Pull Request: https://projects.blender.org/blender/blender/pulls/146249 --- source/blender/editors/sculpt_paint/sculpt_detail.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/sculpt_paint/sculpt_detail.cc b/source/blender/editors/sculpt_paint/sculpt_detail.cc index 652fc7612bb..12b739ec1a2 100644 --- a/source/blender/editors/sculpt_paint/sculpt_detail.cc +++ b/source/blender/editors/sculpt_paint/sculpt_detail.cc @@ -637,7 +637,11 @@ static void dyntopo_detail_size_sample_from_surface(Object &ob, DyntopoDetailSizeEditCustomData *cd) { SculptSession &ss = *ob.sculpt; - BMVert *active_vertex = std::get(ss.active_vert()); + const ActiveVert active_vert = ss.active_vert(); + if (std::holds_alternative(active_vert)) { + return; + } + BMVert *active_vertex = std::get(active_vert); float len_accum = 0; BMeshNeighborVerts neighbors;