From e92a88159c7af972c8edd53e50d6ec2d3592a3dd Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 15 Dec 2009 17:29:05 -0500 Subject: For EXT-3448: New attachments detach after relog. Added a check that the only objects deleted by LLAppearanceManager are links. Probably not the cause of disappearing objects in this bug, but a good safety feature. --HG-- branch : avatar-pipeline --- indra/newview/llappearancemgr.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'indra/newview/llappearancemgr.cpp') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 73fd50f9ea..43b2f34ecd 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -455,7 +455,10 @@ void LLAppearanceManager::purgeCategory(const LLUUID& category, bool keep_outfit LLViewerInventoryItem *item = items.get(i); if (keep_outfit_links && (item->getActualType() == LLAssetType::AT_LINK_FOLDER)) continue; - gInventory.purgeObject(item->getUUID()); + if (item->getIsLinkType()) + { + gInventory.purgeObject(item->getUUID()); + } } } @@ -947,7 +950,10 @@ void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_up else if (areMatchingWearables(vitem,inv_item)) { gAgentWearables.removeWearable(inv_item->getWearableType(),true,0); - gInventory.purgeObject(inv_item->getUUID()); + if (inv_item->getIsLinkType()) + { + gInventory.purgeObject(inv_item->getUUID()); + } } } if (linked_already) @@ -996,10 +1002,9 @@ void LLAppearanceManager::removeCOFItemLinks(const LLUUID& item_id, bool do_upda for (S32 i=0; igetLinkedUUID() == item_id) + if (item->getIsLinkType() && item->getLinkedUUID() == item_id) { - const LLUUID& item_id = item_array.get(i)->getUUID(); - gInventory.purgeObject(item_id); + gInventory.purgeObject(item->getUUID()); } } if (do_update) -- cgit v1.2.3