summaryrefslogtreecommitdiff
path: root/src/gui/npcpostdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/npcpostdialog.cpp')
-rw-r--r--src/gui/npcpostdialog.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/npcpostdialog.cpp b/src/gui/npcpostdialog.cpp
index 5135e56bd..bb5ab3528 100644
--- a/src/gui/npcpostdialog.cpp
+++ b/src/gui/npcpostdialog.cpp
@@ -92,7 +92,8 @@ NpcPostDialog::~NpcPostDialog()
void NpcPostDialog::action(const gcn::ActionEvent &event)
{
- if (event.getId() == "send")
+ const std::string &eventId = event.getId();
+ if (eventId == "send")
{
if (mSender->getText().empty() || mText->getText().empty())
{
@@ -109,7 +110,7 @@ void NpcPostDialog::action(const gcn::ActionEvent &event)
}
setVisible(false);
}
- else if (event.getId() == "cancel")
+ else if (eventId == "cancel")
{
setVisible(false);
}