Commits

nyx committed 8a24410

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)

  • Participants
  • Parent commits 502045f

Comments (0)

Files changed (1)

indra/newview/llvoavatar.cpp

 			// 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)