diff options
author | callum_linden <callum@lindenlab.com> | 2017-11-30 14:44:44 -0800 |
---|---|---|
committer | callum_linden <callum@lindenlab.com> | 2017-11-30 14:44:44 -0800 |
commit | dd0d2805e2b495246525f49325c4492b7b57f157 (patch) | |
tree | 96ae78468bbe760c4934416764a4cd89cf5ae381 /indra/newview/llinventoryfunctions.cpp | |
parent | 2e3c5ac88a434ee437bc3e68b321d5bd0bcd7cc9 (diff) | |
parent | e3a2c5e3217ae74a0277f2e6d4e1e708fe398a1c (diff) |
Automated erge with tip of viewer64
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 67ddd79230..8b50e4248e 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -264,7 +264,9 @@ void update_marketplace_category(const LLUUID& cur_uuid, bool perform_consistenc // is limited to 4. // We also take care of degenerated cases so we don't update all folders in the inventory by mistake. - if (cur_uuid.isNull()) + if (cur_uuid.isNull() + || gInventory.getCategory(cur_uuid) == NULL + || gInventory.getCategory(cur_uuid)->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN) { return; } @@ -275,9 +277,13 @@ void update_marketplace_category(const LLUUID& cur_uuid, bool perform_consistenc { // Retrieve the listing uuid this object is in LLUUID listing_uuid = nested_parent_id(cur_uuid, depth); + LLViewerInventoryCategory* listing_cat = gInventory.getCategory(listing_uuid); + bool listing_cat_loaded = listing_cat != NULL && listing_cat->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN; // Verify marketplace data consistency for this listing - if (perform_consistency_enforcement && LLMarketplaceData::instance().isListed(listing_uuid)) + if (perform_consistency_enforcement + && listing_cat_loaded + && LLMarketplaceData::instance().isListed(listing_uuid)) { LLUUID version_folder_uuid = LLMarketplaceData::instance().getVersionFolder(listing_uuid); S32 version_depth = depth_nesting_in_marketplace(version_folder_uuid); @@ -299,7 +305,9 @@ void update_marketplace_category(const LLUUID& cur_uuid, bool perform_consistenc } // Check if the count on hand needs to be updated on SLM - if (perform_consistency_enforcement && (compute_stock_count(listing_uuid) != LLMarketplaceData::instance().getCountOnHand(listing_uuid))) + if (perform_consistency_enforcement + && listing_cat_loaded + && (compute_stock_count(listing_uuid) != LLMarketplaceData::instance().getCountOnHand(listing_uuid))) { LLMarketplaceData::instance().updateCountOnHand(listing_uuid,1); } |