From 03636509906dd65636d91da18b650e967c9f1a82 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Mon, 1 Jul 2024 13:58:58 -0400 Subject: [PATCH] Fix: Sculpt: Undo restore crash with first operation Mistake in 057fdf4224e0e07a6020cabd4d2a1ca4f307f0a5 --- source/blender/editors/sculpt_paint/sculpt.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/editors/sculpt_paint/sculpt.cc b/source/blender/editors/sculpt_paint/sculpt.cc index c9ba22fb6d2..684e38b030a 100644 --- a/source/blender/editors/sculpt_paint/sculpt.cc +++ b/source/blender/editors/sculpt_paint/sculpt.cc @@ -1461,6 +1461,9 @@ static void restore_position(Object &object, const Span nodes) break; } case PBVH_BMESH: { + if (!undo::get_bmesh_log_entry()) { + return; + } threading::parallel_for(nodes.index_range(), 1, [&](const IndexRange range) { for (PBVHNode *node : nodes.slice(range)) { for (BMVert *vert : BKE_pbvh_bmesh_node_unique_verts(node)) {