From 0971a773c705a183cf6f7e7e2199f78e419733d4 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 28 Jun 2012 11:30:58 +0200 Subject: [PATCH] Fixed: Valgrind warnings --- code/nel/src/3d/render_trav.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/nel/src/3d/render_trav.cpp b/code/nel/src/3d/render_trav.cpp index a8965f60e..5cf6fd20e 100644 --- a/code/nel/src/3d/render_trav.cpp +++ b/code/nel/src/3d/render_trav.cpp @@ -69,7 +69,6 @@ CRenderTrav::CRenderTrav() _CurrentPassOpaque = true; _CacheLightContribution= NULL; - _LastLocalAttenuation= false; // Default light Setup. LightingSystemEnabled= false; @@ -624,7 +623,7 @@ void CRenderTrav::changeLightSetup(CLightContribution *lightContribution, bool uint i; // if same lightContribution, no-op. - if(_CacheLightContribution == lightContribution && _LastLocalAttenuation == useLocalAttenuation) + if (_CacheLightContribution == lightContribution && (lightContribution == NULL || _LastLocalAttenuation == useLocalAttenuation)) return; // else, must setup the lights into driver. else