Fix T92645: Cycles OSL crash due use of uninitialized pointer

Thanks to Ilja Razinkov for identifying the problem and solution.
This commit is contained in:
Brecht Van Lommel 2021-11-09 14:56:22 +01:00
parent 9b2f212016
commit 5f44298280

@ -132,10 +132,12 @@ static void shaderdata_to_shaderglobals(const KernelGlobalsCPU *kg,
/* Used by render-services. */
sd->osl_globals = kg;
if (path_flag & PATH_RAY_SHADOW) {
sd->osl_path_state = nullptr;
sd->osl_shadow_path_state = (const IntegratorShadowStateCPU *)state;
}
else {
sd->osl_path_state = (const IntegratorStateCPU *)state;
sd->osl_shadow_path_state = nullptr;
}
}