diff options
| author | Dave Parks <davep@lindenlab.com> | 2013-04-03 16:56:59 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2013-04-03 16:56:59 -0500 |
| commit | 7a820b88fc45a4a16573387782e1c3f7e412da68 (patch) | |
| tree | 82bdbbb3f338f0b00d3e5a3ffeee50ac1fe06553 /indra/newview/llviewerobject.cpp | |
| parent | d0b12d0af50d55d16328ec70833204094adb8bcb (diff) | |
NORSPEC-71 Lots more UI hookups
Written with and Reviewed By Graham
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
| -rw-r--r-- | indra/newview/llviewerobject.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index f1b54e0e01..286604e367 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4045,7 +4045,7 @@ void LLViewerObject::setTE(const U8 te, const LLTextureEntry &texture_entry) const LLUUID& image_id = getTE(te)->getID(); mTEImages[te] = LLViewerTextureManager::getFetchedTexture(image_id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); - if (getTE(te)->getMaterialParams() != NULL) + if (getTE(te)->getMaterialParams().notNull()) { const LLUUID& norm_id = getTE(te)->getMaterialParams()->getNormalID(); mTENormalMaps[te] = LLViewerTextureManager::getFetchedTexture(norm_id, TRUE, LLViewerTexture::BOOST_BUMP, LLViewerTexture::LOD_TEXTURE); @@ -4094,7 +4094,12 @@ S32 LLViewerObject::setTENormalMapCore(const U8 te, const LLUUID& uuid, LLHost h // uuid == LLUUID::null) { retval = TEM_CHANGE_TEXTURE; - getTE(te)->getMaterialParams()->setNormalID(uuid); + LLTextureEntry* tep = getTE(te); + LLMaterial* mat = tep->getMaterialParams(); + if (mat) + { + mat->setNormalID(uuid); + } mTENormalMaps[te] = LLViewerTextureManager::getFetchedTexture(uuid, TRUE, LLViewerTexture::BOOST_BUMP, LLViewerTexture::LOD_TEXTURE, 0, 0, host); setChanged(TEXTURE); if (mDrawable.notNull()) @@ -4112,7 +4117,12 @@ S32 LLViewerObject::setTESpecularMapCore(const U8 te, const LLUUID& uuid, LLHost // uuid == LLUUID::null) { retval = TEM_CHANGE_TEXTURE; - getTE(te)->getMaterialParams()->setSpecularID(uuid); + LLTextureEntry* tep = getTE(te); + LLMaterial* mat = tep->getMaterialParams(); + if (mat) + { + mat->setSpecularID(uuid); + } mTESpecularMaps[te] = LLViewerTextureManager::getFetchedTexture(uuid, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); setChanged(TEXTURE); if (mDrawable.notNull()) |
