diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-13 15:05:44 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-13 15:05:44 +0000 |
commit | 1bb68d936de2657c3bce3bbe64947f043b5f7333 (patch) | |
tree | 1c2feca2edc4a64e23e6e1c13bfb16962af865af /indra/newview/llpanellandmarkinfo.cpp | |
parent | 2aab1d33e125502913075d38d126936d7c2a4a2e (diff) | |
parent | 9fee359d1baf6e0046655cb8e4afabb8774754b1 (diff) |
viewer2 trunk 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 cd6c727b5c..56d52ccc65 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -376,21 +376,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; |