summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatarself.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2010-12-03 17:09:22 -0500
committerOz Linden <oz@lindenlab.com>2010-12-03 17:09:22 -0500
commit7549df0eaf347e9f490f9cfaf4950dd623a08237 (patch)
tree2949dade42fc865c5abd83854b9f04529a01c581 /indra/newview/llvoavatarself.cpp
parent4f5b27c933c827b98886d6218908b83e85672e3e (diff)
parent2491555272283340206f3532b9417ec07df40022 (diff)
merging beta fixes after 2.4.0-beta1
Diffstat (limited to 'indra/newview/llvoavatarself.cpp')
-rw-r--r--indra/newview/llvoavatarself.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 0250627d1b..5f9e343907 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -783,11 +783,19 @@ void LLVOAvatarSelf::removeMissingBakedTextures()
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
const S32 te = mBakedTextureDatas[i].mTextureIndex;
- LLViewerTexture* tex = getTEImage(te) ;
+ const LLViewerTexture* tex = getTEImage(te);
+
+ // Replace with default if we can't find the asset, assuming the
+ // default is actually valid (which it should be unless something
+ // is seriously wrong).
if (!tex || tex->isMissingAsset())
{
- setTEImage(te, LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT_AVATAR));
- removed = TRUE;
+ LLViewerTexture *imagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT_AVATAR);
+ if (imagep)
+ {
+ setTEImage(te, imagep);
+ removed = TRUE;
+ }
}
}
@@ -823,7 +831,6 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp)
// << llendl;
}
-
if (!regionp || (regionp->getHandle() != mLastRegionHandle))
{
if (mLastRegionHandle != 0)