Fix cycles volume render crash when trying to access primitive attributes

like generated texture coordinates or tangents.
This commit is contained in:
2013-12-28 23:39:15 +01:00
parent fe222643b4
commit 3f39af9cc2
2 changed files with 2 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ CCL_NAMESPACE_BEGIN
ccl_device_inline int find_attribute(KernelGlobals *kg, ShaderData *sd, uint id, AttributeElement *elem)
{
if(sd->object == ~0)
if(sd->object == ~0 || sd->prim == ~0)
return (int)ATTR_STD_NOT_FOUND;
#ifdef __OSL__