Null pointer check exiting sculpt mode
authorCampbell Barton <ideasman42@gmail.com>
Wed, 28 Feb 2018 12:23:48 +0000 (23:23 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 28 Feb 2018 13:39:42 +0000 (00:39 +1100)
Needed for 2.8x, harmless here.

source/blender/editors/sculpt_paint/paint_vertex.c

index e028c752b8824769ec06a52459f0ac635337de2c..5ecd530f5b7ea97d71611d1ec12f40f4555dc5af 100644 (file)
@@ -1165,7 +1165,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;
        }