[Bf-blender-cvs] [3b2d3a3cd11] blender2.8: Fix crash switching sculpt/vpaint -> edit mode

Campbell Barton noreply at git.blender.org
Fri Jun 1 10:34:12 CEST 2018


Commit: 3b2d3a3cd11d07945b18252359378ffadddfe3bd
Author: Campbell Barton
Date:   Fri Jun 1 10:33:20 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB3b2d3a3cd11d07945b18252359378ffadddfe3bd

Fix crash switching sculpt/vpaint -> edit mode

===================================================================

M	source/blender/editors/sculpt_paint/paint_vertex.c
M	source/blender/editors/sculpt_paint/sculpt.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 311587d6b53..3e4a2e24920 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -1188,6 +1188,8 @@ static void ed_vwpaintmode_exit_generic(
 		ED_mesh_mirror_spatial_table(NULL, NULL, NULL, NULL, 'e');
 		ED_mesh_mirror_topo_table(NULL, NULL, 'e');
 	}
+
+	DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
 }
 
 void ED_object_vpaintmode_exit_ex(Object *ob)
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 540882aa022..c0674289a5a 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -5787,6 +5787,8 @@ void ED_object_sculptmode_exit_ex(
 	BKE_sculptsession_free(ob);
 
 	paint_cursor_delete_textures();
+
+	DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
 }
 
 void ED_object_sculptmode_exit(bContext *C)



More information about the Bf-blender-cvs mailing list