diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-12-08 17:25:31 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-12-08 17:25:31 -0500 |
commit | f7c883be9a4bbdcf5e4255ff52e6e6d0824b60ab (patch) | |
tree | 1d8256f6700027a57ae98b0feb7466e4ba3b7329 | |
parent | bfdfec637c482c69f47d4c6ab0ade37e2f67ff5e (diff) |
EXT-3266 : Object contents show up as empty always
InventoryFilter was rejecting all items that didn't exist in agent inventory. Changed this to properly account for inventory of in-world objects.
--HG--
branch : avatar-pipeline
-rw-r--r-- | indra/newview/llinventoryfilter.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 8907bf4c1c..38803b4b8b 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -115,8 +115,6 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) const LLUUID object_id = listener->getUUID(); const LLInventoryObject *object = gInventory.getObject(object_id); - if (!object) return FALSE; - const U32 filterTypes = mFilterOps.mFilterTypes; //////////////////////////////////////////////////////////////////////////////// @@ -127,11 +125,13 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) // If it has no type, pass it, unless it's a link. if (object_type == LLInventoryType::IT_NONE) { - if (object->getIsLinkType()) + if (object && object->getIsLinkType()) return FALSE; } - if ((1LL << object_type & mFilterOps.mFilterObjectTypes) == U64(0)) + else if ((1LL << object_type & mFilterOps.mFilterObjectTypes) == U64(0)) + { return FALSE; + } } // //////////////////////////////////////////////////////////////////////////////// @@ -143,6 +143,10 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) // if its parent is a category of the filter type. if (filterTypes & FILTERTYPE_CATEGORY) { + // Can only filter categories for items in your inventory + // (e.g. versus in-world object contents). + if (!object) return FALSE; + LLUUID cat_id = object_id; if (listener->getInventoryType() != LLInventoryType::IT_CATEGORY) { @@ -163,6 +167,8 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) // Pass if this item is the target UUID or if it links to the target UUID if (filterTypes & FILTERTYPE_UUID) { + if (!object) return FALSE; + if (object->getLinkedUUID() != mFilterOps.mFilterUUID) return FALSE; } |