summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorSoft Linden <soft@lindenlab.com>2009-12-10 18:49:43 -0600
committerSoft Linden <soft@lindenlab.com>2009-12-10 18:49:43 -0600
commitf0e773a6b2683e0e1054e27626cf33e23c5e4017 (patch)
treed51cb63a750ad801a6d3ea47d56a01037890b6b6 /indra/newview/llviewertexture.cpp
parent12f91564e857ba638a2b9604f1990ba620348dc9 (diff)
parent7abdf3b9a05b11d616f74fed2d5a0e30a62615d3 (diff)
Merge changes
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 0d29efaedf..a5a40e9c2c 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -2879,7 +2879,8 @@ BOOL LLViewerMediaTexture::findFaces()
}
S32 face_id = -1 ;
- while((face_id = obj->getFaceIndexWithMediaImpl(mMediaImplp, face_id)) > -1)
+ S32 num_faces = obj->mDrawable->getNumFaces() ;
+ while((face_id = obj->getFaceIndexWithMediaImpl(mMediaImplp, face_id)) > -1 && face_id < num_faces)
{
LLFace* facep = obj->mDrawable->getFace(face_id) ;
if(facep)