From d3c1fdeb34b91bb87e75932e2269f46234303335 Mon Sep 17 00:00:00 2001 From: "Graham Madarasz (Graham)" Date: Fri, 3 May 2013 15:59:43 -0700 Subject: NORSPEC-160 fix trashing of spec map from sunshine integration snafu --- indra/newview/llviewerobject.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewerobject.cpp') diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 9366c901da..7c50abf53b 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4102,7 +4102,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) { @@ -4130,9 +4130,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) { @@ -4195,14 +4194,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); } -- cgit v1.2.3