summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorGraham Madarasz (Graham) <graham@lindenlab.com>2013-05-03 15:59:43 -0700
committerGraham Madarasz (Graham) <graham@lindenlab.com>2013-05-03 15:59:43 -0700
commit930dfc4f17e7a8b2dba9f58a2d9a4f0a46fae408 (patch)
treeed95356b83e6dffb44e2fdaf00cb515337daec3b /indra/newview/llviewerobject.cpp
parent04fceb5f006d6f3b9b36996382e4c1483a599dde (diff)
NORSPEC-160 fix trashing of spec map from sunshine integration snafu
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index fe43583271..ee7003ae30 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -4088,7 +4088,7 @@ S32 LLViewerObject::setTENormalMapCore(const U8 te, LLViewerTexture *image)
{
llassert(image);
S32 retval = TEM_CHANGE_TEXTURE;
- const LLUUID& uuid = image->getID();
+ const LLUUID& uuid = image ? image->getID() : LLUUID::null;
if (uuid != getTE(te)->getID() ||
uuid == LLUUID::null)
{
@@ -4116,9 +4116,8 @@ S32 LLViewerObject::setTENormalMapCore(const U8 te, LLViewerTexture *image)
S32 LLViewerObject::setTESpecularMapCore(const U8 te, LLViewerTexture *image)
{
- llassert(image);
S32 retval = TEM_CHANGE_TEXTURE;
- const LLUUID& uuid = image->getID();
+ const LLUUID& uuid = image ? image->getID() : LLUUID::null;
if (uuid != getTE(te)->getID() ||
uuid == LLUUID::null)
{
@@ -4181,14 +4180,14 @@ S32 LLViewerObject::setTETexture(const U8 te, const LLUUID& uuid)
S32 LLViewerObject::setTENormalMap(const U8 te, const LLUUID& uuid)
{
- LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(
+ LLViewerFetchedTexture *image = (uuid == LLUUID::null) ? NULL : LLViewerTextureManager::getFetchedTexture(
uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost::invalid);
return setTENormalMapCore(te, image);
}
S32 LLViewerObject::setTESpecularMap(const U8 te, const LLUUID& uuid)
{
- LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(
+ LLViewerFetchedTexture *image = (uuid == LLUUID::null) ? NULL : LLViewerTextureManager::getFetchedTexture(
uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost::invalid);
return setTESpecularMapCore(te, image);
}