From 42f16180a985fc0e4704a4e25489ada9d662631a Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Wed, 10 May 2023 18:41:55 +0300
Subject: SL-19536 SL-19652 Fix inventory fetching

---
 indra/newview/llinventorymodelbackgroundfetch.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index 0bb56c7d0c..6b88d0aaf7 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -437,9 +437,10 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
 			{
 				const LLViewerInventoryCategory * cat(gInventory.getCategory(cat_id));
 		
-				if (cat && std::find(all_cats.begin(), all_cats.end(), cat_id) == all_cats.end())
+				if (cat)
 				{
-					if (LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion())
+					if (LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()
+                        && std::find(all_cats.begin(), all_cats.end(), cat_id) == all_cats.end())
 					{
 						LLSD folder_sd;
 						folder_sd["folder_id"]		= cat->getUUID();
-- 
cgit v1.2.3