diff options
author | Kenneth Skovhede <kenneth@hexad.dk> | 2019-09-20 13:49:28 +0300 |
---|---|---|
committer | Kenneth Skovhede <kenneth@hexad.dk> | 2019-09-20 13:49:28 +0300 |
commit | 81ac1bf3a3ffb051ee5743e7d978450fba91c433 (patch) | |
tree | 37be854a6524fb7a811c64a7acb42f006f2a0975 /Duplicati/GUI | |
parent | 5503ad7f2c001a868fb3fd7c260cca8ec5e9fb31 (diff) |
Added guards to prevent a null-error when attempting to connect to a password protected server without a password.
Diffstat (limited to 'Duplicati/GUI')
-rw-r--r-- | Duplicati/GUI/Duplicati.GUI.TrayIcon/HttpServerConnection.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Duplicati/GUI/Duplicati.GUI.TrayIcon/HttpServerConnection.cs b/Duplicati/GUI/Duplicati.GUI.TrayIcon/HttpServerConnection.cs index 6b74095ba..d42af3fd0 100644 --- a/Duplicati/GUI/Duplicati.GUI.TrayIcon/HttpServerConnection.cs +++ b/Duplicati/GUI/Duplicati.GUI.TrayIcon/HttpServerConnection.cs @@ -383,15 +383,16 @@ namespace Duplicati.GUI.TrayIcon switch (m_passwordSource)
{
case Program.PasswordSource.Database:
- Program.databaseConnection.ApplicationSettings.ReloadSettings();
+ if (Program.databaseConnection != null)
+ Program.databaseConnection.ApplicationSettings.ReloadSettings();
- if (Program.databaseConnection.ApplicationSettings.WebserverPasswordTrayIcon != m_password)
+ if (Program.databaseConnection != null && Program.databaseConnection.ApplicationSettings.WebserverPasswordTrayIcon != m_password)
m_password = Program.databaseConnection.ApplicationSettings.WebserverPasswordTrayIcon;
else
hasTriedPassword = true;
break;
case Program.PasswordSource.HostedServer:
- if (Server.Program.DataConnection.ApplicationSettings.WebserverPassword != m_password)
+ if (Server.Program.DataConnection != null && Server.Program.DataConnection.ApplicationSettings.WebserverPassword != m_password)
m_password = Server.Program.DataConnection.ApplicationSettings.WebserverPassword;
else
hasTriedPassword = true;
|