summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-01-30 08:54:29 -0800
committerGraham Linden <graham@lindenlab.com>2019-01-30 08:54:29 -0800
commit12cd42221e16b8bbcd0ad115e0436b075d47d485 (patch)
tree54fb8552bcf71523f0341193b1bfbbbcab5158a8 /indra/newview
parentacbc7f4cddd6ad999c2bc7690c10b85a414a8102 (diff)
SL-10416
Replace hope and asserts with checks in LLFace::setTexture in hopes of side-stepping media texture crash.
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();
}