Finally satisfiable assets

Attempt to handle null reference exception in Key File (not sure to have found source)
This commit is contained in:
BONNEVILLE Geoffroy
2017-11-20 17:21:22 +01:00
parent 52c56757ca
commit e9c79b192b
47 changed files with 7 additions and 7 deletions

View File

@@ -134,7 +134,7 @@ namespace ModernKeePass.ViewModels
{
var compositeKey = new CompositeKey();
if (HasPassword) compositeKey.AddUserKey(new KcpPassword(Password));
if (HasKeyFile) compositeKey.AddUserKey(new KcpKeyFile(IOConnectionInfo.FromFile(KeyFile)));
if (HasKeyFile && KeyFile != null) compositeKey.AddUserKey(new KcpKeyFile(IOConnectionInfo.FromFile(KeyFile)));
return compositeKey;
}
}