Canonicalize detach crash fix to RLVa

This commit is contained in:
Siana Gearz
2013-05-26 15:56:22 +02:00
parent 89e7decc12
commit c61415d785
2 changed files with 12 additions and 9 deletions

View File

@@ -3921,14 +3921,13 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove)
bool fUpdateAppearance = false;
for (uuid_vec_t::const_iterator it = ids_to_remove.begin(); it != ids_to_remove.end(); ++it)
{
const LLInventoryItem* linked_item = gInventory.getLinkedItem(*it);
if ( linked_item && (rlv_handler_t::isEnabled()) && (!rlvPredCanRemoveItem(linked_item)) )
const LLUUID& linked_item_id = gInventory.getLinkedItemID(*it);
if ( (rlv_handler_t::isEnabled()) && (!rlvPredCanRemoveItem(gInventory.getItem(linked_item_id))) )
{
continue;
}
fUpdateAppearance = true;
const LLUUID& linked_item_id = gInventory.getLinkedItemID(*it);
removeCOFItemLinks(linked_item_id);
}
@@ -3949,13 +3948,12 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove)
void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove)
{
// [RLVa:KB] - Checked: 2013-02-12 (RLVa-1.4.8)
const LLInventoryItem* linked_item = gInventory.getLinkedItem(id_to_remove);
if ( linked_item && (rlv_handler_t::isEnabled()) && (!rlvPredCanRemoveItem(linked_item)) )
LLUUID linked_item_id = gInventory.getLinkedItemID(id_to_remove);
if ( (rlv_handler_t::isEnabled()) && (!rlvPredCanRemoveItem(gInventory.getItem(linked_item_id))) )
{
return;
}
// [/RLVA:KB]
LLUUID linked_item_id = gInventory.getLinkedItemID(id_to_remove);
removeCOFItemLinks(linked_item_id);
updateAppearanceFromCOF();
}