diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/register.cpp | 8 | ||||
-rw-r--r-- | src/gui/register.h | 1 |
2 files changed, 3 insertions, 6 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 { diff --git a/src/gui/register.h b/src/gui/register.h index 8551b9e0..4c98788f 100644 --- a/src/gui/register.h +++ b/src/gui/register.h @@ -71,7 +71,6 @@ class RegisterDialog : public Window, public gcn::ActionListener { gcn::Button *mCancelButton; WrongDataNoticeListener *mWrongDataNoticeListener; - OkDialog *mWrongRegisterNotice; LoginData *mLoginData; }; |