diff options
| author | Xiaohong Bao <bao@lindenlab.com> | 2011-07-18 12:09:32 -0600 | 
|---|---|---|
| committer | Xiaohong Bao <bao@lindenlab.com> | 2011-07-18 12:09:32 -0600 | 
| commit | 5707ccf570f71eb8439af775b86d9520dd5862c9 (patch) | |
| tree | a29c49bfd838132667821f1cf4dd0a288b88d2e1 | |
| parent | 5267378577c6e1ca98cdaa6be601550b53b8692f (diff) | |
fix for SH-1904: Medallion .dae makes viewer crash during upload
| -rwxr-xr-x | indra/newview/llmeshrepository.cpp | 3 | 
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(); | 
