diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-11 13:03:14 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-11 13:03:14 +0000 |
commit | a94ae7766e3ec946539556dc2442353da526ea20 (patch) | |
tree | 584f987fb9b3fbaa8acbd55d08e8cc01ce505850 | |
parent | ca1e4d99a21e7445aede214a8faf6d631749d65b (diff) |
CID-83
Checker: FORWARD_NULL
Function: LLPanelLandmarkInfo::populateFoldersList()
File: /indra/newview/llpanellandmarkinfo.cpp
-rw-r--r-- | indra/newview/llpanellandmarkinfo.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 36a542cfa0..1a3a44f608 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -406,20 +406,23 @@ void LLPanelLandmarkInfo::populateFoldersList() // Put the "Landmarks" folder first in list. LLUUID landmarks_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); - const LLViewerInventoryCategory* cat = gInventory.getCategory(landmarks_id); - if (!cat) + const LLViewerInventoryCategory* lmcat = gInventory.getCategory(landmarks_id); + if (!lmcat) { llwarns << "Cannot find the landmarks folder" << llendl; } - std::string cat_full_name = getFullFolderName(cat); - mFolderCombo->add(cat_full_name, cat->getUUID()); + else + { + std::string cat_full_name = getFullFolderName(lmcat); + mFolderCombo->add(cat_full_name, cat->getUUID()); + } typedef std::vector<folder_pair_t> folder_vec_t; folder_vec_t folders; // Sort the folders by their full name. for (S32 i = 0; i < cats.count(); i++) { - cat = cats.get(i); + const LLViewerInventoryCategory* cat = cats.get(i); cat_full_name = getFullFolderName(cat); folders.push_back(folder_pair_t(cat->getUUID(), cat_full_name)); } |