diff options
author | Oz Linden <oz@lindenlab.com> | 2010-12-02 13:50:39 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2010-12-02 13:50:39 -0500 |
commit | 5098ca5ae444ca492bc668fbd07976e96eb5726a (patch) | |
tree | f392ec41ad1c3a44287dfff5efe6997962b9c4fc /indra/newview/llvoavatarself.cpp | |
parent | 37116479d299f23a289e39accc3899d6ea977203 (diff) | |
parent | 6e62c6c410df9001b56ffd57c6c6d8cd9fe035e6 (diff) |
merge fix for STORM-557
Diffstat (limited to 'indra/newview/llvoavatarself.cpp')
-rw-r--r-- | indra/newview/llvoavatarself.cpp | 15 |
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) |