Skip to content
Snippets Groups Projects
Commit e92a8815 authored by Brad Payne (Vir Linden)'s avatar Brad Payne (Vir Linden)
Browse files

For EXT-3448: New attachments detach after relog. Added a check that the only...

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
parent 109de765
No related branches found
No related tags found
No related merge requests found
...@@ -455,7 +455,10 @@ void LLAppearanceManager::purgeCategory(const LLUUID& category, bool keep_outfit ...@@ -455,7 +455,10 @@ void LLAppearanceManager::purgeCategory(const LLUUID& category, bool keep_outfit
LLViewerInventoryItem *item = items.get(i); LLViewerInventoryItem *item = items.get(i);
if (keep_outfit_links && (item->getActualType() == LLAssetType::AT_LINK_FOLDER)) if (keep_outfit_links && (item->getActualType() == LLAssetType::AT_LINK_FOLDER))
continue; 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 ...@@ -947,7 +950,10 @@ void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_up
else if (areMatchingWearables(vitem,inv_item)) else if (areMatchingWearables(vitem,inv_item))
{ {
gAgentWearables.removeWearable(inv_item->getWearableType(),true,0); gAgentWearables.removeWearable(inv_item->getWearableType(),true,0);
gInventory.purgeObject(inv_item->getUUID()); if (inv_item->getIsLinkType())
{
gInventory.purgeObject(inv_item->getUUID());
}
} }
} }
if (linked_already) if (linked_already)
...@@ -996,10 +1002,9 @@ void LLAppearanceManager::removeCOFItemLinks(const LLUUID& item_id, bool do_upda ...@@ -996,10 +1002,9 @@ void LLAppearanceManager::removeCOFItemLinks(const LLUUID& item_id, bool do_upda
for (S32 i=0; i<item_array.count(); i++) for (S32 i=0; i<item_array.count(); i++)
{ {
const LLInventoryItem* item = item_array.get(i).get(); const LLInventoryItem* item = item_array.get(i).get();
if (item->getLinkedUUID() == item_id) if (item->getIsLinkType() && item->getLinkedUUID() == item_id)
{ {
const LLUUID& item_id = item_array.get(i)->getUUID(); gInventory.purgeObject(item->getUUID());
gInventory.purgeObject(item_id);
} }
} }
if (do_update) if (do_update)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment