SH-188 FIX crash in llvoavatar.cpp

We were using a NULL pointer after checking it. Did some logic juggling to
ensure that we only use the pointer if it is non-null

Code reviewed by Seraph
(transplanted from a90fe10ddac9545249c6f218af438a36bcbc3162)
meow-7.2.2
Nyx (Neal Orman) 2010-09-22 18:09:17 -04:00
parent 02a4c4ac0d
commit e8d1ddb225
1 changed files with 3 additions and 3 deletions

View File

@ -6089,9 +6089,9 @@ void LLVOAvatar::updateMeshTextures()
// use the last-known good baked texture until it finish the first
// render of the new layerset.
const BOOL layerset_invalid = !mBakedTextureDatas[i].mTexLayerSet
|| !mBakedTextureDatas[i].mTexLayerSet->getComposite()->isInitialized()
|| !mBakedTextureDatas[i].mTexLayerSet->isLocalTextureDataAvailable();
const BOOL layerset_invalid = mBakedTextureDatas[i].mTexLayerSet
&& ( !mBakedTextureDatas[i].mTexLayerSet->getComposite()->isInitialized()
|| !mBakedTextureDatas[i].mTexLayerSet->isLocalTextureDataAvailable() );
use_lkg_baked_layer[i] = (!is_layer_baked[i]
&& (mBakedTextureDatas[i].mLastTextureIndex != IMG_DEFAULT_AVATAR)