summaryrefslogtreecommitdiff
path: root/indra/newview/lllocalbitmaps.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2015-05-28 17:47:37 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2015-05-28 17:47:37 -0400
commitd822d0e96bb69374f49fef8a827a042474deda8d (patch)
tree91834ede57a52fb6e1d85dace0e1ea49bb62c394 /indra/newview/lllocalbitmaps.cpp
parent25c7e0114085a296eb3e2f7fba7cd2cb5b6177f8 (diff)
parentf3c58f765c0168f25bb13c4427e34b4bdad2f671 (diff)
merge
Diffstat (limited to 'indra/newview/lllocalbitmaps.cpp')
-rwxr-xr-xindra/newview/lllocalbitmaps.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 8fb7550169..1380345164 100755
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -545,12 +545,14 @@ void LLLocalBitmap::updateUserLayers(LLUUID old_id, LLUUID new_id, LLWearableTyp
LLAvatarAppearanceDefines::ETextureIndex reg_texind = getTexIndex(type, baked_texind);
if (reg_texind != LLAvatarAppearanceDefines::TEX_NUM_INDICES)
{
- U32 index = gAgentWearables.getWearableIndex(wearable);
- gAgentAvatarp->setLocalTexture(reg_texind, gTextureList.getImage(new_id), FALSE, index);
- gAgentAvatarp->wearableUpdated(type);
-
- /* telling the manager to rebake once update cycle is fully done */
- LLLocalBitmapMgr::setNeedsRebake();
+ U32 index;
+ if (gAgentWearables.getWearableIndex(wearable,index))
+ {
+ gAgentAvatarp->setLocalTexture(reg_texind, gTextureList.getImage(new_id), FALSE, index);
+ gAgentAvatarp->wearableUpdated(type);
+ /* telling the manager to rebake once update cycle is fully done */
+ LLLocalBitmapMgr::setNeedsRebake();
+ }
}
}