From d882609973c0430f4cad5d09d1e9571d585578a8 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 21 Aug 2023 21:15:55 +0300 Subject: SL-18629 Marketplace folder creation loop avoidance Probably shouldn't happen since we do not allow logins without caps, but to be sure added validation. --- indra/newview/llfloatermarketplacelistings.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index c09e9f523d..71b3b16809 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -481,11 +481,22 @@ void LLFloaterMarketplaceListings::setRootFolder() LLStringUtil::null, [](const LLUUID &new_cat_id) { - LLFloaterMarketplaceListings *marketplace = LLFloaterReg::findTypedInstance("marketplace_listings"); + LLFloaterMarketplaceListings* marketplace = LLFloaterReg::findTypedInstance("marketplace_listings"); if (marketplace) { - // will call setRootFolder again - marketplace->updateView(); + if (new_cat_id.notNull()) + { + // will call setRootFolder again + marketplace->updateView(); + } + // don't update in case of failure, createNewCategory can return + // immediately if cap is missing and will cause a loop + else + { + // unblock + marketplace->mRootFolderCreating = false; + LL_WARNS("SLM") << "Inventory warning: Failed to create marketplace listings folder for a merchant" << LL_ENDL; + } } } ); -- cgit v1.2.3