summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-10 18:50:42 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-10 18:50:42 +0000
commit83b74ef511ac49b02465ece9c35fc80066de729d (patch)
treebcfee65c60b9868ab4d1f5cb7a35b112c15c96b9 /indra/newview/llface.cpp
parent56d43b9c79ede83c563c4d6d1f60ea831926e1ac (diff)
parentbac0248f3b9a2594a3612cf33a246b3e61f89aca (diff)
merge from viewer2 trunk.
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r--indra/newview/llface.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 0a9976f511..e6ad197bad 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -322,7 +322,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()) ;
@@ -1061,17 +1062,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);
+ }
}
}