summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
authorprep <prep@lindenlab.com>2012-11-28 16:36:34 -0500
committerprep <prep@lindenlab.com>2012-11-28 16:36:34 -0500
commite0432f98ee515f9777604aa784d28b63d2abfe40 (patch)
tree398fcae43d9904bde2112a7085c7ef7c1a926100 /indra/newview/llface.cpp
parentbf87920fc91e2ca2b8d9f6f2656ad632c3005164 (diff)
parentf5a47417fde70f78b99744386c6da0bcf78e60d5 (diff)
SH-3563. Pull and merge from viewer-development. Modest code changes to fix alignment issue in llAppearance.
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)