summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-07-18 18:25:47 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-07-18 18:25:47 -0400
commit3ce04f335e640ef9a00b00aae94ef2de841a1f7b (patch)
treefdbf57aff2e34f7ca77795a1e5c69a3544b8e210 /indra/newview/llmeshrepository.cpp
parentfde88ae24d1093fd0f24fe9cfd66dc05a0d1c51f (diff)
SH-1904 FIX (cherry pick from original by bao)
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-xindra/newview/llmeshrepository.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 78e2716be2..7ddc0db20d 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -1399,7 +1399,8 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
instance_entry["face_list"] = LLSD::emptyArray();
- for (S32 face_num = 0; face_num < data.mBaseModel->getNumVolumeFaces(); face_num++)
+ S32 end = llmin((S32)data.mBaseModel->mMaterialList.size(), data.mBaseModel->getNumVolumeFaces()) ;
+ for (S32 face_num = 0; face_num < end; face_num++)
{
LLImportMaterial& material = instance.mMaterial[data.mBaseModel->mMaterialList[face_num]];
LLSD face_entry = LLSD::emptyMap();