summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2015-04-24 20:30:26 +0300
committerandreykproductengine <akleshchev@productengine.com>2015-04-24 20:30:26 +0300
commita89f3f29a0af37c7f3e78e38acb78f78e99dae78 (patch)
tree4825b9df551bf8d1c958b3cd0525a6bb2bd4d5b9 /indra/newview
parentce0c4853f1174aaed895da1a667ea5b0e413dcf7 (diff)
MAINT-4796 FIXED Crash in LLModelLoader::loadFromSLM
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 3f62d94dae..005c6999c3 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -2232,10 +2232,15 @@ bool LLModelLoader::loadFromSLM(const std::string& filename)
for (U32 lod = 0; lod < LLModel::NUM_LODS; ++lod)
{
- if (!model[lod].empty())
+ if (model[lod].size() > idx)
{
instance_list[i].mLOD[lod] = model[lod][idx];
}
+ else if (!model[lod].empty())
+ {
+ // slm load failed - indexes are corrupted
+ return false;
+ }
}
instance_list[i].mModel = model[LLModel::LOD_HIGH][idx];