Commit: e27ab0790f87c3b3f5bd0b1a36bfd011397d2281
Author: Pablo Dobarro
Date:   Wed Apr 24 17:19:52 2019 +0200
Branches: sculpt-mode-features
https://developer.blender.org/rBe27ab0790f87c3b3f5bd0b1a36bfd011397d2281

Fix crash when sculpting with EEVEE/LookDev enabled

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

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

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

diff --git a/source/blender/editors/sculpt_paint/sculpt.c 
b/source/blender/editors/sculpt_paint/sculpt.c
index 4244b2596a5..8f6e1f3af41 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -5740,6 +5740,13 @@ bool sculpt_stroke_get_geometry_info(bContext *C, 
StrokeGeometryInfo *out, const
   ob = vc.obact;
   ss = ob->sculpt;
 
+  if (!ss->pbvh) {
+    copy_v3_fl(out->location, 0.0f);
+    copy_v3_fl(out->normal, 0.0f);
+    copy_v3_fl(out->nearest_vertex_co, 0.0f);
+    return false;
+  }
+
   depth = sculpt_raycast_init(&vc, mouse, ray_start, ray_end, ray_normal, 
original);
   sculpt_stroke_modifiers_check(C, ob, brush);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to