summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-04-10 18:55:07 -0700
committerMerov Linden <merov@lindenlab.com>2014-04-10 18:55:07 -0700
commit253781f87c1653ee203ba3e7bf340747b894140d (patch)
treeee5de566c200ace16c7357d1f6753307ac87e44f /indra/newview/llinventoryfunctions.cpp
parenta0f5a63a661d3ebc03e82463897c63dd35918749 (diff)
DD-16 : Implement sort by stock count in merketplace
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rwxr-xr-xindra/newview/llinventoryfunctions.cpp5
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