summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2011-06-17 10:00:28 -0600
committerXiaohong Bao <bao@lindenlab.com>2011-06-17 10:00:28 -0600
commitf0369f3d2ceb39dcfb4eee06a12c4a8393cb026f (patch)
treed0c7f8d581ce81c23613f0583a8c539c191ac0fe /indra
parent37d9f5eb0beecff596fa3f8c6f7ec2b9a9104d34 (diff)
parentfe022adfa637d4f4f08d48576c75b5148573c8ed (diff)
Automated merge with http://hg.secondlife.com/mesh-development
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloatermodelpreview.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index ab6753b4be..75728fdeeb 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -3107,18 +3107,20 @@ void LLModelPreview::rebuildUploadData()
}
}
- for (U32 i = 0; i < LLModel::NUM_LODS; i++)
- { //fill LOD slots based on reference model index
- if (!mModel[i].empty())
- {
- instance.mLOD[i] = mModel[i][idx];
- }
- else
- {
- instance.mLOD[i] = NULL;
+ if(idx < mBaseModel.size())
+ {
+ for (U32 i = 0; i < LLModel::NUM_LODS; i++)
+ { //fill LOD slots based on reference model index
+ if (mModel[i].size() > idx)
+ {
+ instance.mLOD[i] = mModel[i][idx];
+ }
+ else
+ {
+ instance.mLOD[i] = NULL;
+ }
}
}
-
instance.mTransform = mat;
mUploadData.push_back(instance);
}