summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2012-12-03 14:35:45 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2012-12-03 14:35:45 -0500
commit3be13024c51a714aa94ac55c2a972d3f523024f9 (patch)
treeb9c5c477da9ca20a9cf4e202bad84a5105a33a4a /indra/newview/llface.cpp
parent5c245e941ace3f52dfa3539c473e2c02f207d8a3 (diff)
parentf0a11b1590a8d52281683275f836ac347ccc510f (diff)
merge
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r--indra/newview/llface.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 947ab84eec..cc0ed26ea9 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -166,7 +166,8 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)
//special value to indicate uninitialized position
mIndicesIndex = 0xFFFFFFFF;
-
+
+ mIndexInTex = 0;
mTexture = NULL;
mTEOffset = -1;
mTextureIndex = 255;
@@ -1061,7 +1062,11 @@ bool LLFace::canRenderAsMask()
}
const LLTextureEntry* te = getTextureEntry();
-
+ if( !te || !getViewerObject() || !getTexture() )
+ {
+ return false;
+ }
+
if ((te->getColor().mV[3] == 1.0f) && // can't treat as mask if we have face alpha
(te->getGlow() == 0.f) && // glowing masks are hard to implement - don't mask
getTexture()->getIsAlphaMask()) // texture actually qualifies for masking (lazily recalculated but expensive)