summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-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()