From 54ba657e170614f5f18c84474734a5f97dedcac9 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 18:07:54 +0000 Subject: CID-71 Checker: FORWARD_NULL Function: LLFace::getGeometryVolume(const LLVolume &, const int &, const LLMatrix4 &, const LLMatrix3 &, const unsigned short &) File: /indra/newview/llface.cpp --- indra/newview/llface.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 965ac1cad0..4a540fbe58 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1040,17 +1040,20 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (rebuild_color) { - GLfloat alpha[4] = - { - 0.00f, - 0.25f, - 0.5f, - 0.75f - }; - - if (getPoolType() != LLDrawPool::POOL_ALPHA && (LLPipeline::sRenderDeferred || (LLPipeline::sRenderBump && tep->getShiny()))) + if (tep) { - color.mV[3] = U8 (alpha[tep->getShiny()] * 255); + GLfloat alpha[4] = + { + 0.00f, + 0.25f, + 0.5f, + 0.75f + }; + + if (getPoolType() != LLDrawPool::POOL_ALPHA && (LLPipeline::sRenderDeferred || (LLPipeline::sRenderBump && tep->getShiny()))) + { + color.mV[3] = U8 (alpha[tep->getShiny()] * 255); + } } } -- cgit v1.2.3 From 1d66e3a1fba1d3ea5b47ae4fc54e752cdba9e540 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 18:11:35 +0000 Subject: CID-69 Checker: FORWARD_NULL Function: LLFace::switchTexture(LLViewerTexture *) File: /indra/newview/llface.cpp not a bug. --- indra/newview/llface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 4a540fbe58..d12fd48ffb 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -301,7 +301,8 @@ void LLFace::switchTexture(LLViewerTexture* new_texture) if(!new_texture) { - llerrs << "Can not switch to a null texture." << llendl ; + llerrs << "Can not switch to a null texture." << llendl; + return; } new_texture->addTextureStats(mTexture->getMaxVirtualSize()) ; -- cgit v1.2.3