From 803b6afd00b0e3574b40b866f21a0d3d01f6dc4d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 26 Feb 2013 00:01:56 +0300 Subject: Improve string usage in other files. --- src/gui/questswindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gui/questswindow.cpp') diff --git a/src/gui/questswindow.cpp b/src/gui/questswindow.cpp index 164f3ce26..076e042f9 100644 --- a/src/gui/questswindow.cpp +++ b/src/gui/questswindow.cpp @@ -393,7 +393,7 @@ void QuestsWindow::rebuild(const bool playSound) void QuestsWindow::showQuest(const QuestItem *const quest) { - if (!quest) + if (!quest || !translator) return; const std::vector &texts = quest->texts; @@ -409,7 +409,8 @@ void QuestsWindow::showQuest(const QuestItem *const quest) mText->addRow(translator->getStr(data.text)); break; case QUEST_NAME: - mText->addRow("[" + translator->getStr(data.text) + "]"); + mText->addRow(std::string("[").append(translator->getStr( + data.text)).append("]")); break; } } -- cgit v1.2.3-70-g09d2