diff options
author | callum_linden <none@none> | 2013-05-06 19:45:23 -0700 |
---|---|---|
committer | callum_linden <none@none> | 2013-05-06 19:45:23 -0700 |
commit | 1e7b133e75c2c93290db6b0c9db721e95849ff30 (patch) | |
tree | 0a329819a22244fb84a0f25d2f3e9c04f0d3dd29 /indra/newview/llviewerobject.cpp | |
parent | 90d3045c7f693f599dac64c1845ddc639150fe1e (diff) | |
parent | 9609fa72594dd71f8be6417b5a889cfac7112cfd (diff) |
Merge with lindenlab/viewer-development-materials
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index fe43583271..c020ee36d3 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4086,9 +4086,8 @@ S32 LLViewerObject::setTETextureCore(const U8 te, LLViewerTexture *image) 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 +4115,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 +4179,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); } |