summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2013-04-03 16:56:59 -0500
committerDave Parks <davep@lindenlab.com>2013-04-03 16:56:59 -0500
commitf189ba4a3d927fe0ecfb83b36b60a47c88525fdd (patch)
treec26bb5cdd3c40978a7a73f02b455beb57a851c68 /indra/newview/llviewerobject.cpp
parent6fcec6b47d5bef94c66bd9b01382c2ea6c94e45b (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.cpp16
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())