[Bf-blender-cvs] [86c719f] master: Cycles: Fix crash after recent subd fixes

Sergey Sharybin noreply at git.blender.org
Thu Aug 25 11:37:34 CEST 2016


Commit: 86c719f796d2a5049deb8f2467bf5abaa5fadd53
Author: Sergey Sharybin
Date:   Thu Aug 25 11:31:36 2016 +0200
Branches: master
https://developer.blender.org/rB86c719f796d2a5049deb8f2467bf5abaa5fadd53

Cycles: Fix crash after recent subd fixes

Was happening when object only had curves (doe example, object with hair
particle system and emitter rendering disabled).

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

M	intern/cycles/render/mesh.cpp

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

diff --git a/intern/cycles/render/mesh.cpp b/intern/cycles/render/mesh.cpp
index b02b9b7..5bd22bf 100644
--- a/intern/cycles/render/mesh.cpp
+++ b/intern/cycles/render/mesh.cpp
@@ -587,6 +587,10 @@ void Mesh::add_vertex_normals()
 void Mesh::pack_normals(Scene *scene, uint *tri_shader, float4 *vnormal)
 {
 	Attribute *attr_vN = attributes.find(ATTR_STD_VERTEX_NORMAL);
+	if(attr_vN == NULL) {
+		/* Happens on objects with just hair. */
+		return;
+	}
 
 	float3 *vN = attr_vN->data_float3();
 	uint shader_id = 0;




More information about the Bf-blender-cvs mailing list