diff options
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 584c21cf45..fe43583271 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4093,7 +4093,12 @@ S32 LLViewerObject::setTENormalMapCore(const U8 te, LLViewerTexture *image) uuid == LLUUID::null) { LLTextureEntry* tep = getTE(te); - LLMaterial* mat = tep ? tep->getMaterialParams() : NULL; + LLMaterial* mat = NULL; + if (tep) + { + mat = tep->getMaterialParams(); + } + if (mat) { mat->setNormalID(uuid); @@ -4118,7 +4123,12 @@ S32 LLViewerObject::setTESpecularMapCore(const U8 te, LLViewerTexture *image) uuid == LLUUID::null) { LLTextureEntry* tep = getTE(te); - LLMaterial* mat = tep ? tep->getMaterialParams() : NULL; + LLMaterial* mat = NULL; + if (tep) + { + mat = tep->getMaterialParams(); + } + if (mat) { mat->setSpecularID(uuid); |