summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 5974625dfa..eab564a856 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -846,7 +846,7 @@ S32 LLViewerTexture::getTotalNumFaces() const
S32 LLViewerTexture::getNumFaces(U32 ch) const
{
llassert(ch < LLRender::NUM_TEXTURE_CHANNELS);
- return mNumFaces[ch];
+ return ch < LLRender::NUM_TEXTURE_CHANNELS ? mNumFaces[ch] : 0;
}