[Bf-blender-cvs] [6b9f45c1d1b] master: Sculpt: Fix T101430: Dyntopo undo crash
Joseph Eagar
noreply at git.blender.org
Sat Oct 1 00:28:42 CEST 2022
Commit: 6b9f45c1d1bfafffe6fe251ac7330bc5e5ba8ec2
Author: Joseph Eagar
Date: Fri Sep 30 15:28:26 2022 -0700
Branches: master
https://developer.blender.org/rB6b9f45c1d1bfafffe6fe251ac7330bc5e5ba8ec2
Sculpt: Fix T101430: Dyntopo undo crash
===================================================================
M source/blender/editors/sculpt_paint/sculpt_dyntopo.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list