diff options
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r-- | indra/newview/llviewertexture.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 6bd63a56e9..faf7a93281 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) |