diff options
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 7 |
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]; |