summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-01-01 22:26:32 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-01-01 22:26:32 +0000
commitb7b0ea9e7ce301cbb38203313cf8da56ce71f0ca (patch)
tree494b8b7996e8f3f44d4ad8683b3e0e031d97c1ca
parentff8bd96e7e4266f7af344847afb6f0e7a295ba9b (diff)
downloadmana-client-b7b0ea9e7ce301cbb38203313cf8da56ce71f0ca.tar.gz
mana-client-b7b0ea9e7ce301cbb38203313cf8da56ce71f0ca.tar.bz2
mana-client-b7b0ea9e7ce301cbb38203313cf8da56ce71f0ca.tar.xz
mana-client-b7b0ea9e7ce301cbb38203313cf8da56ce71f0ca.zip
Fix crash in Login with empty name.
-rw-r--r--ChangeLog6
-rw-r--r--src/gui/login.cpp13
-rw-r--r--src/gui/login.h5
3 files changed, 9 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 5c0ba589..655cd4b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-01-01 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/gui/login.cpp, src/gui/login.h: Remove tracking of OkDialog, the
+ garbage collection stuff takes care of deletion and breaks manual
+ tracking.
+
2006-01-01 Bjørn Lindeijer <bjorn@lindeijer.nl>
* src/main.cpp: Applied patch by pclouds that allows for a faster
diff --git a/src/gui/login.cpp b/src/gui/login.cpp
index ad469d22..722911ca 100644
--- a/src/gui/login.cpp
+++ b/src/gui/login.cpp
@@ -61,7 +61,6 @@ WrongDataNoticeListener::action(const std::string &eventId)
target->setText("");
target->setCaretPosition(0);
target->requestFocus();
- //wrongLoginNotice = NULL;
}
}
@@ -143,15 +142,10 @@ LoginDialog::LoginDialog():
serverField->setText(config.getValue("host", ""));
wrongDataNoticeListener = NULL;
- wrongLoginNotice = NULL;
}
LoginDialog::~LoginDialog()
{
- if (wrongLoginNotice)
- {
- delete wrongLoginNotice;
- }
}
void
@@ -180,12 +174,7 @@ LoginDialog::action(const std::string& eventId)
{
wrongDataNoticeListener = new WrongDataNoticeListener();
wrongDataNoticeListener->setTarget(this->passField);
- if (wrongLoginNotice)
- {
- delete wrongLoginNotice;
- }
- wrongLoginNotice = new OkDialog("Error",
- "Enter your username first",
+ new OkDialog("Error", "Enter your username first",
wrongDataNoticeListener);
}
else
diff --git a/src/gui/login.h b/src/gui/login.h
index ca50df96..52ec27b1 100644
--- a/src/gui/login.h
+++ b/src/gui/login.h
@@ -90,12 +90,11 @@ class LoginDialog : public Window, public gcn::ActionListener {
gcn::Button *registerButton;
int mStatus;
bool registration;
-
+
void attemptLogin(const std::string& user, const std::string& pass);
void checkLogin();
-
+
WrongDataNoticeListener *wrongDataNoticeListener;
- OkDialog *wrongLoginNotice;
};
/**