diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-01-21 19:58:38 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-01-21 19:58:38 +0200 |
commit | 5ab34ccc5a5ec0abd6526b16379d7e29d8668ec4 (patch) | |
tree | 5d452866c321f624ea2557bd4370f80e7a9aa589 | |
parent | 676ed67485d51150e89257f82e57b19bd55b9e8c (diff) |
SL-1159 Fix inbox consolidation failure
-rw-r--r-- | indra/newview/llinventorymodel.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index ba453471c6..7c1650ae58 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -461,9 +461,18 @@ void LLInventoryModel::consolidateForType(const LLUUID& main_id, LLFolderType::E LLViewerInventoryCategory* cat = getCategory(*it); changeCategoryParent(cat, main_id, TRUE); } - + // Purge the emptied folder - removeCategory(folder_id); + // Note that this might be a system folder, don't validate removability + LLViewerInventoryCategory* cat = getCategory(folder_id); + if (cat) + { + const LLUUID trash_id = findCategoryUUIDForType(LLFolderType::FT_TRASH); + if (trash_id.notNull()) + { + changeCategoryParent(cat, trash_id, TRUE); + } + } remove_inventory_category(folder_id, NULL); } } |