diff options
author | Merov Linden <merov@lindenlab.com> | 2015-03-20 13:42:03 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2015-03-20 13:42:03 -0700 |
commit | b9397343939df8f0ecd065d11624de74f344577f (patch) | |
tree | 29e0ee2e6919c051675aa0337240583ab626eb23 /indra/newview | |
parent | b4d22741a6118719d45f278ed64f2c4635f0058e (diff) |
DD-324 : Fix crash when recursively wrapping no copy items in stock folders
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llinventoryfunctions.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 6e142d8998..1a7b804d44 100755 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -1764,8 +1764,10 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_ { LLNotificationsUtil::add("AlertMerchantStockFolderSplit"); } - // If we have more than 1 type of items or we are at the listing level, wrap the items in subfolders - if ((count > 1) || (depth == 1)) + // If we have more than 1 type of items or we are at the listing level or we have stok/no stock type mismatch, wrap the items in subfolders + if ((count > 1) || (depth == 1) || + ((folder_type == LLFolderType::FT_MARKETPLACE_STOCK) && (type == LLInventoryType::IT_COUNT)) || + ((folder_type != LLFolderType::FT_MARKETPLACE_STOCK) && (type != LLInventoryType::IT_COUNT))) { // Create one folder per vector at the right depth and of the right type for (S32 i = 0; i <= LLInventoryType::IT_COUNT; i++) @@ -1819,7 +1821,7 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_ { LLViewerInventoryCategory * viewer_cat = (LLViewerInventoryCategory *) (*iter); gInventory.changeCategoryParent(viewer_cat, parent_uuid, false); - // Note : those reparented folders will be recursively visited and validated at the end of this function + result &= validate_marketplacelistings(viewer_cat, cb, fix_hierarchy, depth); } } } |