summaryrefslogtreecommitdiff
path: root/src/gui/windows/logindialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-07-17 13:55:59 +0300
committerAndrei Karas <akaras@inbox.ru>2015-07-17 13:55:59 +0300
commit89dd7d47dabcc52a56a89d9ac5246582fa1b138c (patch)
treec795eb2a2c218029de17e0ca40ea8b6d00dc3c81 /src/gui/windows/logindialog.cpp
parent420c7c31f6ac97741feaf9f34e641ec0d6e0fdf5 (diff)
downloadmanaverse-89dd7d47dabcc52a56a89d9ac5246582fa1b138c.tar.gz
manaverse-89dd7d47dabcc52a56a89d9ac5246582fa1b138c.tar.bz2
manaverse-89dd7d47dabcc52a56a89d9ac5246582fa1b138c.tar.xz
manaverse-89dd7d47dabcc52a56a89d9ac5246582fa1b138c.zip
Add missing checks into logindialog and xml.
Diffstat (limited to 'src/gui/windows/logindialog.cpp')
-rw-r--r--src/gui/windows/logindialog.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp
index 47e86471e..93bf10bc3 100644
--- a/src/gui/windows/logindialog.cpp
+++ b/src/gui/windows/logindialog.cpp
@@ -94,7 +94,8 @@ LoginDialog::LoginDialog(LoginData &data,
setCloseButton(true);
setWindowName("Login");
- charServerHandler->clear();
+ if (charServerHandler)
+ charServerHandler->clear();
// TRANSLATORS: login dialog label
Label *const serverLabel1 = new Label(this, _("Server:"));
@@ -191,8 +192,15 @@ void LoginDialog::postInit()
mPassField->requestFocus();
mLoginButton->setEnabled(canSubmit());
- mRegisterButton->setEnabled(loginHandler->isRegistrationEnabled()
- || !mLoginData->registerUrl.empty());
+ if (loginHandler)
+ {
+ mRegisterButton->setEnabled(loginHandler->isRegistrationEnabled()
+ || !mLoginData->registerUrl.empty());
+ }
+ else
+ {
+ mRegisterButton->setEnabled(false);
+ }
}
LoginDialog::~LoginDialog()