summaryrefslogtreecommitdiff
path: root/src/gui/register.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-11-02 14:11:03 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-11-02 14:11:03 +0000
commit29f07d2f98b82674708f1185f26ed3c482992b04 (patch)
tree941c44de1a711fc458ad65bd5afcb57ea759f489 /src/gui/register.cpp
parentf555abfda840099d34af90fe3682acce09fe5fdf (diff)
downloadmana-29f07d2f98b82674708f1185f26ed3c482992b04.tar.gz
mana-29f07d2f98b82674708f1185f26ed3c482992b04.tar.bz2
mana-29f07d2f98b82674708f1185f26ed3c482992b04.tar.xz
mana-29f07d2f98b82674708f1185f26ed3c482992b04.zip
Fixed a memory leak and a double deletion.
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
{