From 6374834355a8125412527a27804992b6b8732dfa Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Thu, 10 Dec 2009 21:39:15 -0500 Subject: EXT-3302 invisible avatar w/ bling crashes mac viewers not mac-specific. We were treating IMG_INVISIBLE as a baked texture when an avatar used it as a bake. However, some baked textures have 5 channels, IMG_INVISIBLE has 4. Asking KDU to decode the 5th channel of a 4 channel image resulted in a crash. Fix skips the callback for loading morph masks from a bake if the bake image ID is IMG_INVISIBLE. Code reviewed by Seraph --HG-- branch : avatar-pipeline --- indra/newview/llvoavatar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 93b0ad4a5b..03910b0534 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5994,7 +5994,7 @@ void LLVOAvatar::updateMeshTextures() else { mBakedTextureDatas[i].mIsLoaded = FALSE; - if ( (i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER) ) + if ( (baked_img->getID() != IMG_INVISIBLE) && ((i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER)) ) { baked_img->setLoadedCallback(onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, TRUE, TRUE, new LLTextureMaskData( mID )); } @@ -6464,7 +6464,7 @@ void LLVOAvatar::onFirstTEMessageReceived() LLViewerFetchedTexture* image = LLViewerTextureManager::staticCastToFetchedTexture(getImage( mBakedTextureDatas[i].mTextureIndex, 0 ), TRUE) ; mBakedTextureDatas[i].mLastTextureIndex = image->getID(); // If we have more than one texture for the other baked layers, we'll want to call this for them too. - if ( (i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER) ) + if ( (image->getID() != IMG_INVISIBLE) && ((i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER)) ) { image->setLoadedCallback( onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, TRUE, TRUE, new LLTextureMaskData( mID )); } -- cgit v1.2.3