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
Notes: blender-bot 2023-02-14 10:41:18 +01:00
Referenced by issue #40079, file crashes on render (Master) but not 2.70a
1 changed files with 1 additions and 1 deletions

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);