summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2014-03-26 10:08:19 -0700
committersimon <none@none>2014-03-26 10:08:19 -0700
commit70006f4a5651ebaa0362ec2f95b5dda13f72e5c7 (patch)
tree6e1f7e8ccea28fa830bca7f2508a626f6ca907c9 /indra/newview/llviewertexture.cpp
parent73ef75498692e7b7cecb4960f4e308061917d86e (diff)
parent33dfc0a8a1ed56d7d24611981736fd5baf6b03c2 (diff)
Pull in downstream -tiger, -bear, viewer-release and become version 3.7.5
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rwxr-xr-xindra/newview/llviewertexture.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 3da6d33d72..6364eee3ec 100755
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -337,6 +337,11 @@ void LLViewerTextureManager::init()
const S32 dim = 128;
LLPointer<LLImageRaw> image_raw = new LLImageRaw(dim,dim,3);
U8* data = image_raw->getData();
+
+ if (!data)
+ {
+ return;
+ }
memset(data, 0, dim * dim * 3) ;
LLViewerTexture::sBlackImagep = LLViewerTextureManager::getLocalTexture(image_raw.get(), TRUE) ;
@@ -373,8 +378,12 @@ void LLViewerTextureManager::init()
#else
LLViewerFetchedTexture::sDefaultImagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
#endif
- LLViewerFetchedTexture::sDefaultImagep->dontDiscard();
- LLViewerFetchedTexture::sDefaultImagep->setCategory(LLGLTexture::OTHER) ;
+
+ if (LLViewerFetchedTexture::sDefaultImagep)
+ {
+ LLViewerFetchedTexture::sDefaultImagep->dontDiscard();
+ LLViewerFetchedTexture::sDefaultImagep->setCategory(LLGLTexture::OTHER) ;
+ }
LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
LLViewerFetchedTexture::sSmokeImagep->setNoDelete() ;
@@ -690,7 +699,7 @@ bool LLViewerTexture::bindDefaultImage(S32 stage)
if (stage < 0) return false;
bool res = true;
- if (LLViewerFetchedTexture::sDefaultImagep.notNull() && (this != LLViewerFetchedTexture::sDefaultImagep.get()))
+ if (LLViewerFetchedTexture::sDefaultImagep && LLViewerFetchedTexture::sDefaultImagep.notNull() && (this != LLViewerFetchedTexture::sDefaultImagep.get()))
{
// use default if we've got it
res = gGL.getTexUnit(stage)->bind(LLViewerFetchedTexture::sDefaultImagep);