summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llface.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 8df898f8a9..6d0e999845 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -389,16 +389,20 @@ void LLFace::switchTexture(U32 ch, LLViewerTexture* new_texture)
return;
}
- llassert(mTexture[ch].notNull());
-
- new_texture->addTextureStats(mTexture[ch]->getMaxVirtualSize()) ;
+ if (mTexture[ch].notNull())
+ {
+ new_texture->addTextureStats(mTexture[ch]->getMaxVirtualSize()) ;
+ }
if (ch == LLRender::DIFFUSE_MAP)
{
- getViewerObject()->changeTEImage(mTEOffset, new_texture) ;
+ if (getViewerObject())
+ {
+ getViewerObject()->changeTEImage(mTEOffset, new_texture);
+ }
}
- setTexture(ch, new_texture) ;
+ setTexture(ch, new_texture);
dirtyTexture();
}