summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-04-08 15:13:13 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-04-08 15:13:13 +0300
commit4ce1e68ccb3be42b33cf2dcb58ffb6e78e382016 (patch)
tree24fd2b2ed6136969d2010c35da6f0b76abd8c3c1
parentd33328584f331287cce626804e10c962e7c3ce48 (diff)
SL-19529 Marketplace validation improvements
-rw-r--r--indra/newview/llinventoryfunctions.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index dd3750c152..b934ccd22b 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -2342,9 +2342,20 @@ void LLMarketplaceValidator::start()
return;
}
mValidationInProgress = true;
- mPendingCallbacks = 1; // do '1' in case something decides to callback immediately
+
const ValidationRequest &first = mValidationQueue.front();
LLViewerInventoryCategory* cat = gInventory.getCategory(first.mCategoryId);
+ if (!cat)
+ {
+ LL_WARNS() << "Tried to validate a folder that doesn't exist" << LL_ENDL;
+ if (first.mCbDone)
+ {
+ first.mCbDone(false);
+ }
+ mValidationQueue.pop();
+ start();
+ return;
+ }
validation_result_callback_t result_callback = [](S32 pending, bool result)
{
@@ -2365,7 +2376,11 @@ void LLMarketplaceValidator::start()
}
};
+ mPendingResult = true;
+ mPendingCallbacks = 1; // do '1' in case something decides to callback immediately
+
S32 pending_calbacks = 0;
+ bool result = true;
validate_marketplacelistings(
cat,
result_callback,
@@ -2374,9 +2389,9 @@ void LLMarketplaceValidator::start()
first.mDepth,
true,
pending_calbacks,
- mPendingResult);
+ result);
- result_callback(pending_calbacks, mPendingResult);
+ result_callback(pending_calbacks, result);
}
LLMarketplaceValidator::ValidationRequest::ValidationRequest(