summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
authorMaxim Nikolenko <mnikolenko@productengine.com>2022-12-09 14:47:26 +0200
committerGitHub <noreply@github.com>2022-12-09 14:47:26 +0200
commit94cc9149477e59411f7b0fc96823296f121e1b4f (patch)
tree7e69fbe8f1cf17c6000bb944313589aef74d4089 /indra/newview/llinventoryfunctions.cpp
parent9f7c22bbe5794409a6fbb2a1a08834944438e619 (diff)
SL-18823 FIXED Crash when using 'Create folder from selected'
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r--indra/newview/llinventoryfunctions.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 0e0f924d3c..43b30dea5f 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -2587,9 +2587,13 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
LLFloater::setFloaterHost(multi_propertiesp);
}
- std::set<LLUUID> selected_uuid_set = LLAvatarActions::getInventorySelectedUUIDs();
uuid_vec_t ids;
- std::copy(selected_uuid_set.begin(), selected_uuid_set.end(), std::back_inserter(ids));
+ for (std::set<LLFolderViewItem*>::iterator it = selected_items.begin(), end_it = selected_items.end();
+ it != end_it;
+ ++it)
+ {
+ ids.push_back(static_cast<LLFolderViewModelItemInventory*>((*it)->getViewModelItem())->getUUID());
+ }
// Check for actions that get handled in bulk
if (action == "wear")
{
@@ -2648,7 +2652,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
}
else if ("ungroup_folder_items" == action)
{
- if (selected_uuid_set.size() == 1)
+ if (ids.size() == 1)
{
LLInventoryCategory* inv_cat = gInventory.getCategory(*ids.begin());
if (!inv_cat || LLFolderType::lookupIsProtectedType(inv_cat->getPreferredType()))