diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-05-02 22:14:59 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-05-02 22:14:59 +0400 |
commit | f87682f631c38970736aee0dd5b66bc5b3d2fbb9 (patch) | |
tree | e4b9d3a42cd620a64912c9ac9f578b65b60daee4 | |
parent | 203a4d42ca9f8a6e41c60c9d7a4e855b0c6cf635 (diff) |
Fix #31247: cycles crash after recent bugfix.
-rw-r--r-- | intern/cycles/kernel/kernel_shader.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_shader.h b/intern/cycles/kernel/kernel_shader.h index af821bad868..2138038e49d 100644 --- a/intern/cycles/kernel/kernel_shader.h +++ b/intern/cycles/kernel/kernel_shader.h @@ -180,7 +180,8 @@ __device void shader_setup_from_sample(KernelGlobals *kg, ShaderData *sd, } sd->flag = kernel_tex_fetch(__shader_flag, (sd->shader & SHADER_MASK)*2); - sd->flag |= kernel_tex_fetch(__object_flag, sd->object); + if(sd->object != -1) + sd->flag |= kernel_tex_fetch(__object_flag, sd->object); #ifdef __DPDU__ /* dPdu/dPdv */ |