summaryrefslogtreecommitdiff
path: root/indra/newview/llfriendcard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfriendcard.cpp')
-rw-r--r--indra/newview/llfriendcard.cpp13
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);