From c395be02b1e8ca6a5d2fed241563bf2fbbc4f3ef Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Wed, 22 Sep 2010 18:10:38 -0400 Subject: SH-188 crash in llvoavatar.cpp We were using a NULL pointer after checking it was null due to a logic error. Re-shuffled the logic to ensure we would only dereference pointer after it was known to be non-null Code reviewed by Seraph --- indra/newview/llvoavatar.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index a6b3c436f4..54400c184b 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6189,9 +6189,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) -- cgit v1.2.3