[Bf-blender-cvs] [e7aca5bd3c8] master: Null pointer check exiting sculpt mode

Campbell Barton noreply at git.blender.org
Wed Feb 28 13:26:25 CET 2018


Commit: e7aca5bd3c8d8199834b535e97972216e7747bfa
Author: Campbell Barton
Date:   Wed Feb 28 23:23:48 2018 +1100
Branches: master
https://developer.blender.org/rBe7aca5bd3c8d8199834b535e97972216e7747bfa

Null pointer check exiting sculpt mode

Needed for 2.8x, harmless here.

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

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

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

diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index e550ed66fc2..824f870f3c5 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -1144,7 +1144,7 @@ static void ed_vwpaintmode_exit_generic(
 	}
 
 	/* If the cache is not released by a cancel or a done, free it now. */
-	if (ob->sculpt->cache) {
+	if (ob->sculpt && ob->sculpt->cache) {
 		sculpt_cache_free(ob->sculpt->cache);
 		ob->sculpt->cache = NULL;
 	}



More information about the Bf-blender-cvs mailing list