Crashfix; Guard against 0 pointer textures.

Nicky 2012-10-22 15:40:18 -04:00
parent c8ba971e84
commit fdb0218bfc
1 changed files with 5 additions and 1 deletions

View File

@ -1062,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)