diff options
Diffstat (limited to 'src/gui/login.cpp')
-rw-r--r-- | src/gui/login.cpp | 5 |
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) |