diff options
Diffstat (limited to 'src/gui/registerdialog.cpp')
-rw-r--r-- | src/gui/registerdialog.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/registerdialog.cpp b/src/gui/registerdialog.cpp index 53ce9b3d3..27f56d3d5 100644 --- a/src/gui/registerdialog.cpp +++ b/src/gui/registerdialog.cpp @@ -168,11 +168,12 @@ RegisterDialog::~RegisterDialog() void RegisterDialog::action(const gcn::ActionEvent &event) { - if (event.getId() == "cancel") + const std::string &eventId = event.getId(); + if (eventId == "cancel") { close(); } - else if (event.getId() == "register" && canSubmit()) + else if (eventId == "register" && canSubmit()) { const std::string user = mUserField->getText(); logger->log("RegisterDialog::register Username is %s", user.c_str()); |