Fix T40079: cycles crash with objects that have hair motion blur, but no triangle motion.

This commit is contained in:
Brecht Van Lommel
2014-05-08 15:25:16 +02:00
parent 105aa67cda
commit 19bddbfc54

View File

@@ -346,7 +346,7 @@ void Mesh::add_vertex_normals()
Attribute *attr_mP = attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
Attribute *attr_mN = attributes.find(ATTR_STD_MOTION_VERTEX_NORMAL);
if(has_motion_blur() && !attr_mN) {
if(has_motion_blur() && attr_mP && !attr_mN) {
/* create attribute */
attr_mN = attributes.add(ATTR_STD_MOTION_VERTEX_NORMAL);