From 558190f50c1a90b0d11b68b24f60bce482c6a6ec Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 10 Dec 2009 16:56:09 -0700 Subject: fix for DEV-43870: EXT-3137: Crash when add quicktime media to multiple faces. --- indra/newview/llviewertexture.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewertexture.cpp') 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) -- cgit v1.2.3