summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-10 17:31:51 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-10 17:31:51 +0000
commitd398131bd753b05045dc9ca7e9bcaf3d2d4daf99 (patch)
treef52d272ce1141ee296c44b9d4edecc32a149a474
parent4a8b0e0f43c8bb1cbb77e8c89e5675e33dbce5e2 (diff)
CID-96
-rw-r--r--indra/newview/llagentwearables.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index d560331392..71fc62b04b 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -310,21 +310,24 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const S32 type,
return;
LLUUID old_item_id = getWearableItemID((EWearableType)type,index);
+
if (wearable)
{
wearable->setItemID(item_id);
- }
- if (old_item_id.notNull())
- {
- gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id);
- setWearable((EWearableType)type,index,wearable);
- }
- else
- {
- pushWearable((EWearableType)type,wearable);
+ if (old_item_id.notNull())
+ {
+ gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id);
+ setWearable((EWearableType)type,index,wearable);
+ }
+ else
+ {
+ pushWearable((EWearableType)type,wearable);
+ }
}
+
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
+
LLViewerInventoryItem* item = gInventory.getItem(item_id);
if (item && wearable)
{