summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
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