summaryrefslogtreecommitdiff
path: root/src/gui/register.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/register.cpp')
-rw-r--r--src/gui/register.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gui/register.cpp b/src/gui/register.cpp
index 00880352..7cef62a2 100644
--- a/src/gui/register.cpp
+++ b/src/gui/register.cpp
@@ -44,7 +44,6 @@
RegisterDialog::RegisterDialog(LoginData *loginData):
Window("Register"),
mWrongDataNoticeListener(new WrongDataNoticeListener()),
- mWrongRegisterNotice(0),
mLoginData(loginData)
{
gcn::Label *userLabel = new gcn::Label("Name:");
@@ -104,7 +103,7 @@ RegisterDialog::RegisterDialog(LoginData *loginData):
RegisterDialog::~RegisterDialog()
{
- delete mWrongRegisterNotice;
+ delete mWrongDataNoticeListener;
}
void
@@ -183,9 +182,8 @@ RegisterDialog::action(const std::string &eventId, gcn::Widget *widget)
mConfirmField->setText("");
}
- delete mWrongRegisterNotice;
- mWrongRegisterNotice = new OkDialog("Error", errorMsg.str());
- mWrongRegisterNotice->addActionListener(mWrongDataNoticeListener);
+ OkDialog *dlg = new OkDialog("Error", errorMsg.str());
+ dlg->addActionListener(mWrongDataNoticeListener);
}
else
{