From d46d74dbea0cbf4a680cd4611ff99c356fcbc030 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 24 Jun 2011 17:42:34 -0600 Subject: fix for SH-1904: Medallion .dae makes viewer crash during upload --- indra/newview/llmeshrepository.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 2b340fc54d..97c64f7761 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1575,6 +1575,11 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) for (S32 face_num = 0; face_num < data.mBaseModel->getNumVolumeFaces(); face_num++) { + if(face_num >= instance.mMaterial.size()) + { + break ; + } + LLImportMaterial& material = instance.mMaterial[face_num]; LLSD face_entry = LLSD::emptyMap(); LLViewerFetchedTexture *texture = material.mDiffuseMap.get(); -- cgit v1.2.3