diff options
author | Bryan O'Sullivan <bos@lindenlab.com> | 2009-09-08 14:49:49 -0700 |
---|---|---|
committer | Bryan O'Sullivan <bos@lindenlab.com> | 2009-09-08 14:49:49 -0700 |
commit | 1018b36b87d0d19e020c1e416c33c76b06125633 (patch) | |
tree | ef111a3f5b634ddc3aa23f6e6c3505142e54261a /indra/newview/llfriendcard.cpp | |
parent | 91aa2f37f409b7755d460c5a8e9c8d6a9a50557c (diff) | |
parent | 76001ce3f0b53391c674f315855017b78a3a2873 (diff) |
Merge
Diffstat (limited to 'indra/newview/llfriendcard.cpp')
-rw-r--r-- | indra/newview/llfriendcard.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp index bef5f094e3..97b7f3e9ad 100644 --- a/indra/newview/llfriendcard.cpp +++ b/indra/newview/llfriendcard.cpp @@ -173,6 +173,15 @@ bool LLFriendCardsManager::isCategoryInFriendFolder(const LLViewerInventoryCateg return TRUE == gInventory.isObjectDescendentOf(cat->getUUID(), findFriendFolderUUIDImpl()); } +bool LLFriendCardsManager::isAnyFriendCategory(const LLUUID& catID) const +{ + const LLUUID& friendFolderID = findFriendFolderUUIDImpl(); + if (catID == friendFolderID) + return true; + + return TRUE == gInventory.isObjectDescendentOf(catID, friendFolderID); +} + void LLFriendCardsManager::syncFriendsFolder() { //lets create "Friends" and "Friends/All" in the Inventory "Calling Cards" if they are absent @@ -305,10 +314,12 @@ void LLFriendCardsManager::findMatchedFriendCards(const LLUUID& avatarID, LLInve LLInventoryModel::cat_array_t cats; LLUUID friendFolderUUID = findFriendFolderUUIDImpl(); - LLParticularBuddyCollector matchFunctor(avatarID); LLViewerInventoryCategory* friendFolder = gInventory.getCategory(friendFolderUUID); + if (NULL == friendFolder) + return; + LLParticularBuddyCollector matchFunctor(avatarID); LLInventoryModel::cat_array_t subFolders; subFolders.push_back(friendFolder); |