summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-07-28 16:28:31 +0300
committerVadim Savchuk <vsavchuk@productengine.com>2010-07-28 16:28:31 +0300
commit9c1af0798f69f72e0bbe63408fd34c2b4a464366 (patch)
tree1111378fb85119773b7033245c18b20811728f67 /indra/newview/llinventoryfunctions.cpp
parentae62a2d63da77b9923128271790f12a995b9a919 (diff)
parent9206341e680ff682ec2842c676c066bb78c2f29d (diff)
Merge from default branch
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r--indra/newview/llinventoryfunctions.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 2517db2678..86af76e0a4 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -250,6 +250,18 @@ BOOL get_can_item_be_worn(const LLUUID& id)
const LLViewerInventoryItem* item = gInventory.getItem(id);
if (!item)
return FALSE;
+
+ if (LLAppearanceMgr::isLinkInCOF(item->getLinkedUUID()))
+ {
+ // an item having links in COF (i.e. a worn item)
+ return FALSE;
+ }
+
+ if (gInventory.isObjectDescendentOf(id, LLAppearanceMgr::instance().getCOF()))
+ {
+ // a non-link object in COF (should not normally happen)
+ return FALSE;
+ }
const LLUUID trash_id = gInventory.findCategoryUUIDForType(
LLFolderType::FT_TRASH);