Commit: 578f70f28869aacd354abe85298b731f92d0e5be
Author: Sergey Sharybin
Date:   Sun Feb 7 06:18:51 2016 +0500
Branches: master
https://developer.blender.org/rB578f70f28869aacd354abe85298b731f92d0e5be

Cycles: Fix access uninitialized light after recent refactor/fixes

===================================================================

M       intern/cycles/render/light.cpp

===================================================================

diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp
index 8bb5fec..1637045 100644
--- a/intern/cycles/render/light.cpp
+++ b/intern/cycles/render/light.cpp
@@ -206,7 +206,7 @@ void LightManager::device_update_distribution(Device 
*device, DeviceScene *dscen
        bool background_mis = false;
 
        foreach(Light *light, scene->lights) {
-               if(light->has_contribution(scene))
+               if(light->is_enabled)
                        num_lights++;
        }
 
@@ -345,7 +345,7 @@ void LightManager::device_update_distribution(Device 
*device, DeviceScene *dscen
 
        int light_index = 0;
        foreach(Light *light, scene->lights) {
-               if(!light->has_contribution(scene))
+               if(!light->is_enabled)
                        continue;
 
                distribution[offset].x = totarea;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to