summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 72c9170b06..a4dde62056 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -4854,7 +4854,7 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights)
LLModel* base_mdl = *base_iter;
base_iter++;
- for (S32 i = 0; i < mdl->getNumVolumeFaces(); ++i)
+ for (S32 i = 0, e = mdl->getNumVolumeFaces(); i < e; ++i)
{
const LLVolumeFace &vf = mdl->getVolumeFace(i);
U32 num_vertices = vf.mNumVertices;
@@ -5286,7 +5286,7 @@ BOOL LLModelPreview::render()
gGL.multMatrix((GLfloat*) mat.mMatrix);
- for (U32 i = 0; i < mVertexBuffer[mPreviewLOD][model].size(); ++i)
+ for (U32 i = 0, e = mVertexBuffer[mPreviewLOD][model].size(); i < e; ++i)
{
LLVertexBuffer* buffer = mVertexBuffer[mPreviewLOD][model][i];
@@ -5561,7 +5561,7 @@ BOOL LLModelPreview::render()
if (!model->mSkinWeights.empty())
{
- for (U32 i = 0; i < mVertexBuffer[mPreviewLOD][model].size(); ++i)
+ for (U32 i = 0, e = mVertexBuffer[mPreviewLOD][model].size(); i < e; ++i)
{
LLVertexBuffer* buffer = mVertexBuffer[mPreviewLOD][model][i];
@@ -5630,6 +5630,7 @@ BOOL LLModelPreview::render()
position[j] = v;
}
+ llassert(model->mMaterialList.size() > i);
const std::string& binding = instance.mModel->mMaterialList[i];
const LLImportMaterial& material = instance.mMaterial[binding];