From 94cc9149477e59411f7b0fc96823296f121e1b4f Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 9 Dec 2022 14:47:26 +0200 Subject: SL-18823 FIXED Crash when using 'Create folder from selected' --- indra/newview/llinventoryfunctions.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinventoryfunctions.cpp') 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 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::iterator it = selected_items.begin(), end_it = selected_items.end(); + it != end_it; + ++it) + { + ids.push_back(static_cast((*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())) -- cgit v1.2.3