diff options
author | andreykproductengine <akleshchev@productengine.com> | 2014-10-17 19:57:33 +0300 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2014-10-17 19:57:33 +0300 |
commit | 370cbd429d3763405795a95cb9355a302b56014a (patch) | |
tree | 174e0308b7e9fd9c3f48f29d182c0162dcf998d4 /indra/llprimitive | |
parent | 79212e759b19761726baad29845a505e034dc014 (diff) |
MAINT-4515 FIXED [loader mods] viewer crashed when uploading a large mesh
Diffstat (limited to 'indra/llprimitive')
-rw-r--r-- | indra/llprimitive/lldaeloader.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp index 80bb0cd265..945b691196 100644 --- a/indra/llprimitive/lldaeloader.cpp +++ b/indra/llprimitive/lldaeloader.cpp @@ -2287,7 +2287,10 @@ bool LLDAELoader::loadModelsFromDomMesh(domMesh* mesh, std::vector<LLModel*>& mo next->getVolumeFaces() = remainder; next->mNormalizedScale = ret->mNormalizedScale; next->mNormalizedTranslation = ret->mNormalizedTranslation; - next->mMaterialList.assign(ret->mMaterialList.begin() + LL_SCULPT_MESH_MAX_FACES, ret->mMaterialList.end()); + if ( ret->mMaterialList.size() > LL_SCULPT_MESH_MAX_FACES) + { + next->mMaterialList.assign(ret->mMaterialList.begin() + LL_SCULPT_MESH_MAX_FACES, ret->mMaterialList.end()); + } ret = next; } |