diff options
author | James Cook <james@lindenlab.com> | 2010-03-02 14:06:23 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-03-02 14:06:23 -0800 |
commit | fe8d015851f74d375776791aa1adec204799037b (patch) | |
tree | 644a0dfbd4cd750d69ccbf1a82fe1fc277842d2d /indra/newview/llpanellandmarkinfo.cpp | |
parent | 822d042e0c04dba2cdaced8c81b50840972a7286 (diff) | |
parent | 96da7000e34585d24b4b6946a30a3fb77d668f76 (diff) |
Merge
Diffstat (limited to 'indra/newview/llpanellandmarkinfo.cpp')
-rw-r--r-- | indra/newview/llpanellandmarkinfo.cpp | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 3f292dc416..e376fe4c32 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -383,21 +383,31 @@ void LLPanelLandmarkInfo::createLandmark(const LLUUID& folder_id) // static std::string LLPanelLandmarkInfo::getFullFolderName(const LLViewerInventoryCategory* cat) { - std::string name = cat->getName(); + std::string name; LLUUID parent_id; - // translate category name, if it's right below the root - // FIXME: it can throw notification about non existent string in strings.xml - if (cat->getParentUUID().notNull() && cat->getParentUUID() == gInventory.getRootFolderID()) + llassert(cat); + if (cat) { - LLTrans::findString(name, "InvFolder " + name); - } + name = cat->getName(); - // we don't want "My Inventory" to appear in the name - while ((parent_id = cat->getParentUUID()).notNull() && parent_id != gInventory.getRootFolderID()) - { - cat = gInventory.getCategory(parent_id); - name = cat->getName() + "/" + name; + // translate category name, if it's right below the root + // FIXME: it can throw notification about non existent string in strings.xml + if (cat->getParentUUID().notNull() && cat->getParentUUID() == gInventory.getRootFolderID()) + { + LLTrans::findString(name, "InvFolder " + name); + } + + // we don't want "My Inventory" to appear in the name + while ((parent_id = cat->getParentUUID()).notNull() && parent_id != gInventory.getRootFolderID()) + { + cat = gInventory.getCategory(parent_id); + llassert(cat); + if (cat) + { + name = cat->getName() + "/" + name; + } + } } return name; |