Missing null check (for unit test)

This commit is contained in:
Sebastiaan Janssen
2017-03-17 12:11:28 +01:00
parent c79aaa9c48
commit f4eb37d44d

View File

@@ -326,7 +326,8 @@ namespace Umbraco.Core.Security
//Special case to allow changing password without validating existing credentials
//This is used during installation only
if (AllowManuallyChangingPassword == false && ApplicationContext.Current.IsConfigured == false && oldPassword == "default")
if (AllowManuallyChangingPassword == false && ApplicationContext.Current != null
&& ApplicationContext.Current.IsConfigured == false && oldPassword == "default")
{
return PerformChangePassword(username, oldPassword, newPassword);
}