Fix cycles volume render crash when trying to access primitive attributes
like generated texture coordinates or tangents.
This commit is contained in:
@@ -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__
|
||||
|
||||
Reference in New Issue
Block a user