diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llinventorymodel.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/linden/indra/newview/llinventorymodel.cpp b/linden/indra/newview/llinventorymodel.cpp index aa90538..4e54e78 100644 --- a/linden/indra/newview/llinventorymodel.cpp +++ b/linden/indra/newview/llinventorymodel.cpp | |||
@@ -290,12 +290,16 @@ void LLInventoryModel::getDirectDescendentsOf(const LLUUID& cat_id, | |||
290 | // specifies 'type' as what it defaults to containing. The category is | 290 | // specifies 'type' as what it defaults to containing. The category is |
291 | // not necessarily only for that type. *NOTE: This will create a new | 291 | // not necessarily only for that type. *NOTE: This will create a new |
292 | // inventory category on the fly if one does not exist. | 292 | // inventory category on the fly if one does not exist. |
293 | LLUUID LLInventoryModel::findCategoryUUIDForType(LLAssetType::EType t) | 293 | LLUUID LLInventoryModel::findCategoryUUIDForType(LLAssetType::EType t, bool create_folder) |
294 | { | 294 | { |
295 | LLUUID rv = findCatUUID(t); | 295 | LLUUID rv = findCatUUID(t); |
296 | if(rv.isNull() && isInventoryUsable()) | 296 | if(rv.isNull() && isInventoryUsable() && create_folder) |
297 | { | 297 | { |
298 | rv = createNewCategory(rv, t, NULL); | 298 | LLUUID root_id = gAgent.getInventoryRootID(); |
299 | if(root_id.notNull()) | ||
300 | { | ||
301 | rv = createNewCategory(root_id, t, NULL); | ||
302 | } | ||
299 | } | 303 | } |
300 | return rv; | 304 | return rv; |
301 | } | 305 | } |