Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2013-12-29 02:39:15 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2013-12-29 02:39:15 +0400
commit3f39af9cc2765c2cf3daab30c4ad0be58e341e19 (patch)
tree3054bd190552c794daf448e93e55bc69465d6b85 /intern/cycles/kernel/svm/svm_attribute.h
parentfe222643b4a53fae38bc5ead86551b99abbdc583 (diff)
Fix cycles volume render crash when trying to access primitive attributes
like generated texture coordinates or tangents.
Diffstat (limited to 'intern/cycles/kernel/svm/svm_attribute.h')
-rw-r--r--intern/cycles/kernel/svm/svm_attribute.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/kernel/svm/svm_attribute.h b/intern/cycles/kernel/svm/svm_attribute.h
index 90409e16477..4c53bfd74fa 100644
--- a/intern/cycles/kernel/svm/svm_attribute.h
+++ b/intern/cycles/kernel/svm/svm_attribute.h
@@ -22,7 +22,7 @@ ccl_device void svm_node_attr_init(KernelGlobals *kg, ShaderData *sd,
uint4 node, NodeAttributeType *type,
NodeAttributeType *mesh_type, AttributeElement *elem, int *offset, uint *out_offset)
{
- if(sd->object != ~0) {
+ if(sd->object != ~0 && sd->prim != ~0) {
/* find attribute by unique id */
uint id = node.y;
uint attr_offset = sd->object*kernel_data.bvh.attributes_map_stride;