summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2009-12-10 21:39:15 -0500
committerNyx (Neal Orman) <nyx@lindenlab.com>2009-12-10 21:39:15 -0500
commit6374834355a8125412527a27804992b6b8732dfa (patch)
tree45c17b58576939c3aec87f781f128d61eea5ccc1
parent152010b8c6f0c5e6aec1cf56176d767f70205411 (diff)
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
-rw-r--r--indra/newview/llvoavatar.cpp4
1 files changed, 2 insertions, 2 deletions
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 ));
}