Fixed crash on empty password for CredentialsLoginVM

This commit is contained in:
erri120 2020-04-26 18:09:48 +02:00
parent a8e62d3c40
commit 519c9327ef
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135

View File

@ -34,6 +34,12 @@ namespace Wabbajack
public void Login(SecureString password) public void Login(SecureString password)
{ {
if (password == null || password.Length == 0)
{
ReturnMessage = new LoginReturnMessage("You need to input a password!", true);
return;
}
ReturnMessage = _downloader.LoginWithCredentials(Username, password); ReturnMessage = _downloader.LoginWithCredentials(Username, password);
password.Clear(); password.Clear();
} }