summaryrefslogtreecommitdiff
path: root/src/gui/login.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-30 23:57:40 +0300
committerAndrei Karas <akaras@inbox.ru>2011-03-31 01:04:53 +0300
commit91a51ec64c35713914b22f2d9a283dc5b4091c12 (patch)
tree0289142a45284514a8981b02601c83ac1039dd5d /src/gui/login.cpp
parentd629f56517f55d1fd756c4774d9a368d66f615df (diff)
downloadplus-91a51ec64c35713914b22f2d9a283dc5b4091c12.tar.gz
plus-91a51ec64c35713914b22f2d9a283dc5b4091c12.tar.bz2
plus-91a51ec64c35713914b22f2d9a283dc5b4091c12.tar.xz
plus-91a51ec64c35713914b22f2d9a283dc5b4091c12.zip
Fix memory leaks and some other errors.
Diffstat (limited to 'src/gui/login.cpp')
-rw-r--r--src/gui/login.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/login.cpp b/src/gui/login.cpp
index 853276dca..d910d37bc 100644
--- a/src/gui/login.cpp
+++ b/src/gui/login.cpp
@@ -106,7 +106,8 @@ LoginDialog::LoginDialog(LoginData *loginData, std::string serverName,
mKeepCheck = new CheckBox(_("Remember username"), mLoginData->remember);
mUpdateTypeLabel = new Label(_("Update:"));
- mUpdateTypeDropDown = new DropDown(new UpdateTypeModel());
+ mUpdateTypeModel = new UpdateTypeModel();
+ mUpdateTypeDropDown = new DropDown(mUpdateTypeModel);
mUpdateTypeDropDown->setActionEventId("updatetype");
mUpdateTypeDropDown->setSelected((loginData->updateType
| LoginData::Upd_Custom) ^ LoginData::Upd_Custom);
@@ -161,6 +162,8 @@ LoginDialog::LoginDialog(LoginData *loginData, std::string serverName,
LoginDialog::~LoginDialog()
{
+ delete mUpdateTypeModel;
+ mUpdateTypeModel = 0;
}
void LoginDialog::action(const gcn::ActionEvent &event)