summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorDave Houlton <euclid@lindenlab.com>2020-01-29 17:09:17 +0000
committerDave Houlton <euclid@lindenlab.com>2020-01-29 17:09:17 +0000
commiteaf83ea9c7eef663456507c32b0c1511ab69d157 (patch)
tree7f608467b3608127049ddc78d5045da032777cb4 /indra/newview/llappearancemgr.cpp
parent3e44cb06df22dd1b684dc8574c3b44d0851527bc (diff)
parent2a6b48c9b0c813c5e4ff8ac176fdf4e6c9466c22 (diff)
Merged in D440-merge-master (pull request #1)
Merge master (release 6.3.7) into DRTVWR-440 Approved-by: Dave Houlton <euclid@lindenlab.com>
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r--indra/newview/llappearancemgr.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 472d11b786..1a33059188 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1712,6 +1712,24 @@ void LLAppearanceMgr::slamCategoryLinks(const LLUUID& src_id, const LLUUID& dst_
LLInventoryModel::item_array_t* items;
LLSD contents = LLSD::emptyArray();
gInventory.getDirectDescendentsOf(src_id, cats, items);
+ if (!cats || !items)
+ {
+ // NULL means the call failed -- cats/items map doesn't exist (note: this does NOT mean
+ // that the cat just doesn't have any items or subfolders).
+ LLViewerInventoryCategory* category = gInventory.getCategory(src_id);
+ if (category)
+ {
+ LL_WARNS() << "Category '" << category->getName() << "' descendents corrupted, linking content failed." << LL_ENDL;
+ }
+ else
+ {
+ LL_WARNS() << "Category could not be retrieved, linking content failed." << LL_ENDL;
+ }
+ llassert(cats != NULL && items != NULL);
+
+ return;
+ }
+
LL_INFOS() << "copying " << items->size() << " items" << LL_ENDL;
for (LLInventoryModel::item_array_t::const_iterator iter = items->begin();
iter != items->end();