summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llface.cpp')
-rwxr-xr-x[-rw-r--r--]indra/newview/llface.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index c2c9183e57..0b3bc2b19a 100644..100755
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -167,6 +167,7 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)
//special value to indicate uninitialized position
mIndicesIndex = 0xFFFFFFFF;
+ mIndexInTex = 0;
mTexture = NULL;
mTEOffset = -1;
mTextureIndex = 255;
@@ -1053,6 +1054,10 @@ 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