[Bf-blender-cvs] [1c3b2b5dd8c] blender-v2.83-release: Fix T77105: Crashes when clicking "new scene" button

Dalai Felinto noreply at git.blender.org
Wed May 27 12:00:54 CEST 2020


Commit: 1c3b2b5dd8cc2d321a2f4fe1fd75059de7c91dbc
Author: Dalai Felinto
Date:   Wed May 27 11:58:49 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB1c3b2b5dd8cc2d321a2f4fe1fd75059de7c91dbc

Fix T77105: Crashes when clicking "new scene" button

This was introduced on ecc395e473d.

Effectively this is reverting that commit for cases when
scene->toolsettings->sculpt is NULL. But since the facesets are only
working for sculpting this should be fine.

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

M	source/blender/draw/engines/overlay/overlay_engine.c

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

diff --git a/source/blender/draw/engines/overlay/overlay_engine.c b/source/blender/draw/engines/overlay/overlay_engine.c
index 0e1bbaf284d..61337ac8d1d 100644
--- a/source/blender/draw/engines/overlay/overlay_engine.c
+++ b/source/blender/draw/engines/overlay/overlay_engine.c
@@ -78,11 +78,14 @@ static void OVERLAY_engine_init(void *vedata)
   if (v3d->shading.type == OB_WIRE) {
     pd->overlay.flag |= V3D_OVERLAY_WIREFRAMES;
   }
-  if (ts->sculpt->flags & SCULPT_HIDE_FACE_SETS) {
-    pd->overlay.sculpt_mode_face_sets_opacity = 0.0f;
-  }
-  if (ts->sculpt->flags & SCULPT_HIDE_MASK) {
-    pd->overlay.sculpt_mode_mask_opacity = 0.0f;
+
+  if (ts->sculpt) {
+    if (ts->sculpt->flags & SCULPT_HIDE_FACE_SETS) {
+      pd->overlay.sculpt_mode_face_sets_opacity = 0.0f;
+    }
+    if (ts->sculpt->flags & SCULPT_HIDE_MASK) {
+      pd->overlay.sculpt_mode_mask_opacity = 0.0f;
+    }
   }
 
   pd->use_in_front = (v3d->shading.type <= OB_SOLID) ||



More information about the Bf-blender-cvs mailing list