SL-10416
Replace hope and asserts with checks in LLFace::setTexture in hopes of side-stepping media texture crash.meow-7.2.2
parent
acbc7f4cdd
commit
12cd42221e
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue