diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-03-02 12:49:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-03-02 12:49:03 +0300 |
commit | 421c0d17d65ee740c992c96b04a00b846b50a2e5 (patch) | |
tree | dbc4b398940d5054fcb9680f3076c28c3c8ba565 /src/gui | |
parent | 25b140643566c251d89cc83261b90171b768abbe (diff) | |
download | plus-421c0d17d65ee740c992c96b04a00b846b50a2e5.tar.gz plus-421c0d17d65ee740c992c96b04a00b846b50a2e5.tar.bz2 plus-421c0d17d65ee740c992c96b04a00b846b50a2e5.tar.xz plus-421c0d17d65ee740c992c96b04a00b846b50a2e5.zip |
Fix crash in tests without translator created.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index 37abf7d0a..1657968df 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -251,14 +251,11 @@ void BrowserBox::addRow(const std::string &row, const bool atTop) { const int id = atoi(bLink.link.c_str()); if (id) - { - bLink.caption = translator->getStr( - ItemDB::get(id).getName()); - } + bLink.caption = ItemDB::get(id).getName(); else - { - bLink.caption = translator->getStr(bLink.link); - } + bLink.caption = bLink.link; + if (translator) + bLink.caption = translator->getStr(bLink.caption); } newRow.append(tmp.substr(0, idx1)); |