Cycles: Fix crash when building with no shading systems

This commit is contained in:
2018-03-06 12:00:51 +01:00
parent ec904ed327
commit 76122bc8f0

View File

@@ -994,8 +994,10 @@ ccl_device void shader_eval_surface(KernelGlobals *kg, ShaderData *sd,
DiffuseBsdf *bsdf = (DiffuseBsdf*)bsdf_alloc(sd,
sizeof(DiffuseBsdf),
make_float3(0.8f, 0.8f, 0.8f));
bsdf->N = sd->N;
sd->flag |= bsdf_diffuse_setup(bsdf);
if (bsdf != NULL) {
bsdf->N = sd->N;
sd->flag |= bsdf_diffuse_setup(bsdf);
}
#endif
}