diff options
| author | Merov Linden <merov@lindenlab.com> | 2014-04-10 18:55:07 -0700 |
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2014-04-10 18:55:07 -0700 |
| commit | 253781f87c1653ee203ba3e7bf340747b894140d (patch) | |
| tree | ee5de566c200ace16c7357d1f6753307ac87e44f /indra/newview/llinventoryfunctions.cpp | |
| parent | a0f5a63a661d3ebc03e82463897c63dd35918749 (diff) | |
DD-16 : Implement sort by stock count in merketplace
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
| -rwxr-xr-x | indra/newview/llinventoryfunctions.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index ff38017d6f..57e1b6d9bc 100755 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -796,6 +796,11 @@ S32 compute_stock_count(LLUUID cat_uuid) { // Handle the case of the folder being a stock folder immediately LLViewerInventoryCategory* cat = gInventory.getCategory(cat_uuid); + if (!cat) + { + // Not a category so no stock count to speak of + return -1; + } if (cat->getPreferredType() == LLFolderType::FT_MARKETPLACE_STOCK) { // Note: stock folders are *not* supposed to have nested subfolders so we stop recursion here |
