[Bf-blender-cvs] [761111efb8e] master: Fix T71878: Cycles crash with adaptive subdivision and empty mesh

Brecht Van Lommel noreply at git.blender.org
Sun Dec 8 19:50:03 CET 2019


Commit: 761111efb8e40fa030cb48761df8c066d0e43ae5
Author: Brecht Van Lommel
Date:   Sun Dec 8 19:49:34 2019 +0100
Branches: master
https://developer.blender.org/rB761111efb8e40fa030cb48761df8c066d0e43ae5

Fix T71878: Cycles crash with adaptive subdivision and empty mesh

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

M	intern/cycles/render/mesh_subdivision.cpp

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

diff --git a/intern/cycles/render/mesh_subdivision.cpp b/intern/cycles/render/mesh_subdivision.cpp
index a5a35fc049e..40dd658eadd 100644
--- a/intern/cycles/render/mesh_subdivision.cpp
+++ b/intern/cycles/render/mesh_subdivision.cpp
@@ -394,7 +394,7 @@ void Mesh::tessellate(DiagSplit *split)
   int num_faces = subd_faces.size();
 
   Attribute *attr_vN = subd_attributes.find(ATTR_STD_VERTEX_NORMAL);
-  float3 *vN = attr_vN->data_float3();
+  float3 *vN = (attr_vN) ? attr_vN->data_float3() : NULL;
 
   /* count patches */
   int num_patches = 0;



More information about the Bf-blender-cvs mailing list