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:
-rw-r--r--intern/cycles/kernel/kernel_shadow.h8
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;