diff options
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 3666c51c82..0af6451108 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -150,7 +150,10 @@ void LLInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params) { // Determine the root folder in case specified, and // build the views starting with that folder. - const LLFolderType::EType preferred_type = LLViewerFolderType::lookupTypeFromNewCategoryName(params.start_folder); + + std::string start_folder_name(params.start_folder()); + + const LLFolderType::EType preferred_type = LLViewerFolderType::lookupTypeFromNewCategoryName(start_folder_name); LLUUID root_id; @@ -164,6 +167,12 @@ void LLInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params) ? gInventory.findCategoryUUIDForType(preferred_type, false, false) : LLUUID::null; } + + if ((root_id == LLUUID::null) && !start_folder_name.empty()) + { + llwarns << "No category found that matches start_folder: " << start_folder_name << llendl; + root_id = LLUUID::generateNewID(); + } LLRect folder_rect(0, 0, @@ -184,7 +193,6 @@ void LLInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params) p.use_label_suffix = params.use_label_suffix; p.allow_multiselect = mAllowMultiSelect; mFolderRoot = LLUICtrlFactory::create<LLFolderView>(p); - } void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params) |