Fix T39525: branched path + no lights + disabled use all lights option crash.

This commit is contained in:
Brecht Van Lommel
2014-03-31 13:51:52 +02:00
parent 277fb1a31f
commit c8862806ba

View File

@@ -954,8 +954,10 @@ ccl_device_noinline void kernel_branched_path_integrate_lighting(KernelGlobals *
PathState *state, PathRadiance *L, ccl_global float *buffer)
{
#ifdef __EMISSION__
bool all = kernel_data.integrator.sample_all_lights_direct;
kernel_branched_path_integrate_direct_lighting(kg, rng, sd, state, throughput, num_samples_adjust, L, all);
if(kernel_data.integrator.use_direct_light) {
bool all = kernel_data.integrator.sample_all_lights_direct;
kernel_branched_path_integrate_direct_lighting(kg, rng, sd, state, throughput, num_samples_adjust, L, all);
}
#endif
for(int i = 0; i< sd->num_closure; i++) {