Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2022-10-01 01:28:26 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-10-01 01:28:26 +0300
commit6b9f45c1d1bfafffe6fe251ac7330bc5e5ba8ec2 (patch)
treeb1f8794c1877774a91e3235848af56c01e8b08ea /source
parent5b0485fd7711494ecc927e97adbeb2655d940af6 (diff)
Sculpt: Fix T101430: Dyntopo undo crash
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_dyntopo.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_dyntopo.c b/source/blender/editors/sculpt_paint/sculpt_dyntopo.c
index 2e3834803c9..a524f84cc6e 100644
--- a/source/blender/editors/sculpt_paint/sculpt_dyntopo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_dyntopo.c
@@ -147,8 +147,13 @@ static void SCULPT_dynamic_topology_disable_ex(
SculptSession *ss = ob->sculpt;
Mesh *me = ob->data;
- BKE_sculpt_attribute_destroy(ob, ss->attrs.dyntopo_node_id_vertex);
- BKE_sculpt_attribute_destroy(ob, ss->attrs.dyntopo_node_id_face);
+ if (ss->attrs.dyntopo_node_id_vertex) {
+ BKE_sculpt_attribute_destroy(ob, ss->attrs.dyntopo_node_id_vertex);
+ }
+
+ if (ss->attrs.dyntopo_node_id_face) {
+ BKE_sculpt_attribute_destroy(ob, ss->attrs.dyntopo_node_id_face);
+ }
SCULPT_pbvh_clear(ob);