summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-05-17 16:25:59 -0400
committerOz Linden <oz@lindenlab.com>2013-05-17 16:25:59 -0400
commit251d3f896633f37867aacaffd48ddf1e9b784960 (patch)
tree03828ac02b01cd3546fc7a9bcc498e30b3f18226 /indra/newview/llvovolume.cpp
parent8761c87990512d0402003f9fb01e67508fb2bbaa (diff)
parent174eda3ed010280277cf2771e838e902a74d6561 (diff)
merge changes for latest integration repo
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rwxr-xr-xindra/newview/llvovolume.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index a9b540507f..c3c6747e99 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1976,8 +1976,11 @@ S32 LLVOVolume::setTEGlow(const U8 te, const F32 glow)
void LLVOVolume::setTEMaterialParamsCallback(const LLMaterialID &pMaterialID, const LLMaterialPtr pMaterialParams, U32 te)
{
LL_DEBUGS("MaterialTEs") << "materialid " << pMaterialID.asString() << " to TE " << te << LL_ENDL;
+ if (te >= getNumTEs())
+ return;
+
LLTextureEntry* texture_entry = getTE(te);
- if (texture_entry && (texture_entry->getMaterialID().isNull() || (texture_entry->getMaterialID() == pMaterialID)))
+ if (texture_entry)
{
setTEMaterialParams(te, pMaterialParams);
}