From 253781f87c1653ee203ba3e7bf340747b894140d Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 10 Apr 2014 18:55:07 -0700 Subject: DD-16 : Implement sort by stock count in merketplace --- indra/newview/llinventoryfunctions.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llinventoryfunctions.cpp') 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 -- cgit v1.2.3