Cycles: Fixed uninitialized memory
authorStefan Werner <stefan.werner@tangent-animation.com>
Fri, 18 Jan 2019 14:16:11 +0000 (15:16 +0100)
committerStefan Werner <stefan.werner@tangent-animation.com>
Fri, 18 Jan 2019 14:17:21 +0000 (15:17 +0100)
Cryptomatte on CPU with accurate mode was hitting uninitialized variables.
This is now explicitly initializing them to NULL.

intern/cycles/device/device_cpu.cpp

index 16908b0244ad69d8f28b52f48cb70762f812528a..a92c052a5df9b759c5eb1876d6bb6e2036e333d3 100644 (file)
@@ -924,6 +924,7 @@ protected:
                        kg.decoupled_volume_steps[i] = NULL;
                }
                kg.decoupled_volume_steps_index = 0;
                        kg.decoupled_volume_steps[i] = NULL;
                }
                kg.decoupled_volume_steps_index = 0;
+               kg.coverage_asset = kg.coverage_object = kg.coverage_material = NULL;
 #ifdef WITH_OSL
                OSLShader::thread_init(&kg, &kernel_globals, &osl_globals);
 #endif
 #ifdef WITH_OSL
                OSLShader::thread_init(&kg, &kernel_globals, &osl_globals);
 #endif