summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2011-06-24 17:42:34 -0600
committerXiaohong Bao <bao@lindenlab.com>2011-06-24 17:42:34 -0600
commitd46d74dbea0cbf4a680cd4611ff99c356fcbc030 (patch)
tree04e9c5799a55646a85d60fcc7273619f8652c432
parent3161143977f0241c982552b53eb00cde0c65ce70 (diff)
fix for SH-1904: Medallion .dae makes viewer crash during upload
-rwxr-xr-xindra/newview/llmeshrepository.cpp5
1 files changed, 5 insertions, 0 deletions
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();