From 14eadadf993eb4f89188aa4cd8ea0859a86374d3 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 13 Jun 2023 22:41:49 +0300 Subject: SL-19857 Exception at category creation --- indra/newview/llinventorymodel.cpp | 5 +++-- indra/newview/llviewerinventory.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 59b34cc95c..ed375661b8 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1031,13 +1031,14 @@ void LLInventoryModel::createNewCategory(const LLUUID& parent_id, { if (new_category.isNull()) { - if (callback) + if (callback && !callback.empty()) { callback(new_category); } return; } + // todo: not needed since AIS does the accounting? LLViewerInventoryCategory* folderp = gInventory.getCategory(new_category); if (!folderp) { @@ -1057,7 +1058,7 @@ void LLInventoryModel::createNewCategory(const LLUUID& parent_id, updateCategory(cat); } - if (callback) + if (callback && !callback.empty()) { callback(new_category); } diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 68619cb1a8..94390b899d 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1766,7 +1766,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const L if (panel) { LLHandle handle = panel->getHandle(); - std::function callback_cat_created = [handle](const LLUUID& new_category_id) + callback_cat_created = [handle](const LLUUID& new_category_id) { gInventory.notifyObservers(); LLInventoryPanel* panel = static_cast(handle.get()); -- cgit v1.2.3