summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llvovolume.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 2630aaf43e..9ebe648680 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -5646,7 +5646,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
// HACK -- brute force this check every time a drawable gets rebuilt
- for (S32 i = 0; i < drawablep->getNumFaces(); ++i)
+ S32 num_tex = llmin(vobj->getNumTEs(), drawablep->getNumFaces());
+ for (S32 i = 0; i < num_tex; ++i)
{
vobj->updateTEMaterialTextures(i);
}