diff options
author | Kitty Barnett <develop@catznip.com> | 2013-05-12 16:10:31 +0200 |
---|---|---|
committer | Kitty Barnett <develop@catznip.com> | 2013-05-12 16:10:31 +0200 |
commit | 5ac9d9cb05f22099bea8c9312f5e0b234430022a (patch) | |
tree | dbbc463c82b74e5003fd430308d56f0abad8361f /indra/newview/llviewerobject.cpp | |
parent | c2c9380fe135fd8b191ebe3c9a38129af4994ed8 (diff) |
LLMaterialMgr::get() doesn't handle a callback request for LLMaterialID::null
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rwxr-xr-x | indra/newview/llviewerobject.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index d56df96c44..4e233d479a 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4393,15 +4393,18 @@ S32 LLViewerObject::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID << ", material " << pMaterialID << LL_ENDL; retval = LLPrimitive::setTEMaterialID(te, pMaterialID); - } - // Kitty would like to know if this is necessary? - // Since we should get a setTEMaterialParams that does it anyway? - // - setChanged(TEXTURE); - if (mDrawable.notNull()) + if (retval) { - gPipeline.markTextured(mDrawable); + // Kitty would like to know if this is necessary? + // Since we should get a setTEMaterialParams that does it anyway? + // + setChanged(TEXTURE); + if (mDrawable.notNull()) + { + gPipeline.markTextured(mDrawable); + } } + } return retval; } @@ -4420,11 +4423,11 @@ S32 LLViewerObject::setTEMaterialParams(const U8 te, const LLMaterialPtr pMateri << ", object " << mID << " (" << retval << ")" << LL_ENDL; - setTENormalMap(te, tep->getMaterialParams()->getNormalID()); - setTESpecularMap(te, tep->getMaterialParams()->getSpecularID()); + setTENormalMap(te, (pMaterialParams) ? pMaterialParams->getNormalID() : LLUUID::null); + setTESpecularMap(te, (pMaterialParams) ? pMaterialParams->getSpecularID() : LLUUID::null); setChanged(TEXTURE); - if (mDrawable.notNull()) + if (mDrawable.notNull()) { gPipeline.markTextured(mDrawable); } |