From 7afa8058aae0d5363cc19c7df1e6d2d7ec3bf7ac Mon Sep 17 00:00:00 2001 From: Josh Bell Date: Thu, 1 Nov 2007 22:02:35 +0000 Subject: svn merge -r 72652:72881 svn+ssh://svn.lindenlab.com/svn/linden/branches/sl-search-11 --> release QAR-11: pair-reviewed the merge w/ Sam. --- indra/newview/llinventorymodel.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index aa90538e40..4e54e78430 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -290,12 +290,16 @@ void LLInventoryModel::getDirectDescendentsOf(const LLUUID& cat_id, // specifies 'type' as what it defaults to containing. The category is // not necessarily only for that type. *NOTE: This will create a new // inventory category on the fly if one does not exist. -LLUUID LLInventoryModel::findCategoryUUIDForType(LLAssetType::EType t) +LLUUID LLInventoryModel::findCategoryUUIDForType(LLAssetType::EType t, bool create_folder) { LLUUID rv = findCatUUID(t); - if(rv.isNull() && isInventoryUsable()) + if(rv.isNull() && isInventoryUsable() && create_folder) { - rv = createNewCategory(rv, t, NULL); + LLUUID root_id = gAgent.getInventoryRootID(); + if(root_id.notNull()) + { + rv = createNewCategory(root_id, t, NULL); + } } return rv; } -- cgit v1.2.3