diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-01-25 06:00:57 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-01-25 06:00:57 +0400 |
commit | 38c94e919457eacdaedf641bb4afdd68af288b21 (patch) | |
tree | a67a5a5df6698a3ef6aba444741cd616b3df9859 /intern/cycles/render/light.cpp | |
parent | c411cde415ee7dc8a208e932d5ba1a240c4e669e (diff) |
Fix cycles crash that happened with mesh emission and diffuse/glossy ray
visibility disabled on some objects.
Diffstat (limited to 'intern/cycles/render/light.cpp')
-rw-r--r-- | intern/cycles/render/light.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp index 1b94d603a26..04fea1953e7 100644 --- a/intern/cycles/render/light.cpp +++ b/intern/cycles/render/light.cpp @@ -198,8 +198,10 @@ void LightManager::device_update_distribution(Device *device, DeviceScene *dscen bool have_emission = false; /* skip if we are not visible for BSDFs */ - if(!(object->visibility & (PATH_RAY_DIFFUSE|PATH_RAY_GLOSSY|PATH_RAY_TRANSMIT))) + if(!(object->visibility & (PATH_RAY_DIFFUSE|PATH_RAY_GLOSSY|PATH_RAY_TRANSMIT))) { + j++; continue; + } /* skip if we have no emission shaders */ foreach(uint sindex, mesh->used_shaders) { |