summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2009-12-10 17:05:21 -0700
committerXiaohong Bao <bao@lindenlab.com>2009-12-10 17:05:21 -0700
commit7abdf3b9a05b11d616f74fed2d5a0e30a62615d3 (patch)
tree6bf072c701282647f94b5a4f5a8be4643cf20ebc
parentaf3aae559e3205575d0bf2896473908164a00b3e (diff)
parent2237973792c927ccf7e46278c27252ffe8fc952b (diff)
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/
-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)