diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-10 17:48:03 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-10 17:48:03 +0000 |
commit | 6e73357a866f0c9fdc8f482c9cffc0e409b76be0 (patch) | |
tree | 6d60cca122a29b111982b9c49172b140646e3905 /indra/newview | |
parent | ed26b11f6867d8938afd214ef9b5da80f7ef7be7 (diff) |
CID-88
Checker: FORWARD_NULL
Function: LLItemBridge::restoreToWorld()
File: /indra/newview/llinventorybridge.cpp
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index db182ae8d3..5d2a1b7a41 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1113,6 +1113,9 @@ void LLItemBridge::restoreItem() void LLItemBridge::restoreToWorld() { + //Similar functionality to the drag and drop rez logic + bool remove_from_inventory = false; + LLViewerInventoryItem* itemp = (LLViewerInventoryItem*)getItem(); if (itemp) { @@ -1125,23 +1128,20 @@ void LLItemBridge::restoreToWorld() msg->nextBlockFast(_PREHASH_InventoryData); itemp->packMessage(msg); msg->sendReliable(gAgent.getRegion()->getHost()); - } - - //Similar functionality to the drag and drop rez logic - BOOL remove_from_inventory = FALSE; - - //remove local inventory copy, sim will deal with permissions and removing the item - //from the actual inventory if its a no-copy etc - if(!itemp->getPermissions().allowCopyBy(gAgent.getID())) - { - remove_from_inventory = TRUE; - } - // Check if it's in the trash. (again similar to the normal rez logic) - const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - if(gInventory.isObjectDescendentOf(itemp->getUUID(), trash_id)) - { - remove_from_inventory = TRUE; + //remove local inventory copy, sim will deal with permissions and removing the item + //from the actual inventory if its a no-copy etc + if(!itemp->getPermissions().allowCopyBy(gAgent.getID())) + { + remove_from_inventory = true; + } + + // Check if it's in the trash. (again similar to the normal rez logic) + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); + if(gInventory.isObjectDescendentOf(itemp->getUUID(), trash_id)) + { + remove_from_inventory = true; + } } if(remove_from_inventory) |