diff options
Diffstat (limited to 'intern/cycles/kernel/kernel_shadow.h')
-rw-r--r-- | intern/cycles/kernel/kernel_shadow.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/kernel_shadow.h b/intern/cycles/kernel/kernel_shadow.h index c02118fd17c..b350e068177 100644 --- a/intern/cycles/kernel/kernel_shadow.h +++ b/intern/cycles/kernel/kernel_shadow.h @@ -146,10 +146,6 @@ ccl_device_inline bool shadow_blocked(KernelGlobals *kg, PathState *state, Ray * bounce++; } - /* free dynamic storage */ - if(hits != hits_stack) - free(hits); - #ifdef __VOLUME__ /* attenuation for last line segment towards light */ if(ps.volume_stack[0].shader != SHADER_NONE) @@ -158,6 +154,10 @@ ccl_device_inline bool shadow_blocked(KernelGlobals *kg, PathState *state, Ray * *shadow *= throughput; } + + /* free dynamic storage */ + if(hits != hits_stack) + free(hits); } else { Intersection isect; |