diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-11-09 16:56:22 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-11-09 17:29:41 +0300 |
commit | 5f442982803e50d4add20950106971cde565f3cb (patch) | |
tree | 33b2aa2b91336a7c09f950f46b4b0a5040a27b8b /intern/cycles/kernel | |
parent | 9b2f2120163286bf08fa5ed341fa01eea8283dca (diff) |
Fix T92645: Cycles OSL crash due use of uninitialized pointer
Thanks to Ilja Razinkov for identifying the problem and solution.
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/osl/shader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/kernel/osl/shader.cpp b/intern/cycles/kernel/osl/shader.cpp index 33633c69e29..ae001b34a1d 100644 --- a/intern/cycles/kernel/osl/shader.cpp +++ b/intern/cycles/kernel/osl/shader.cpp @@ -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; } } |