From 38c94e919457eacdaedf641bb4afdd68af288b21 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 25 Jan 2013 02:00:57 +0000 Subject: Fix cycles crash that happened with mesh emission and diffuse/glossy ray visibility disabled on some objects. --- intern/cycles/render/light.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'intern/cycles/render/light.cpp') 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) { -- cgit v1.2.3