summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2021-01-05 17:43:14 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2021-01-05 17:43:14 +0200
commit8c41c00888bbfe7b1c6501e995554a39a8bf944b (patch)
tree90126b5056fa485ac03de7fd8fc7716683da8df4 /indra/newview
parentba47d9315470049bc19a7c07b6a333f56b490bad (diff)
SL-14632 FIXED The viewer is crashed after deleting the new favorite folder
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewerinventory.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index bbed741a33..ed1d726528 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1422,6 +1422,11 @@ void remove_inventory_category(
LLNotificationsUtil::add("CannotRemoveProtectedCategories");
return;
}
+ const LLUUID fav_id = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_FAVORITE);
+ if ((cat_id == fav_id) || gInventory.isObjectDescendentOf(fav_id, cat_id))
+ {
+ gSavedPerAccountSettings.setString("FavoritesFolder", "");
+ }
AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1);
AISAPI::RemoveCategory(cat_id, cr);
}