diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-08-25 12:31:36 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-08-25 12:31:36 +0300 |
commit | 86c719f796d2a5049deb8f2467bf5abaa5fadd53 (patch) | |
tree | 7a50ea619b629d86e5721b296b9bf602add2cc42 /intern/cycles/render | |
parent | 086ec8af485402f1cce5e8705de4ade07c741dbc (diff) |
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).
Diffstat (limited to 'intern/cycles/render')
-rw-r--r-- | intern/cycles/render/mesh.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/cycles/render/mesh.cpp b/intern/cycles/render/mesh.cpp index b02b9b792b7..5bd22bf1de8 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; |