Guard against null ref

This commit is contained in:
Hao Kung 2016-04-01 14:16:49 -07:00
parent 4d6ad51f8a
commit 5cd236c1b0
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ namespace Microsoft.AspNetCore.Authentication
if (ShouldHandleScheme(AuthenticationManager.AutomaticScheme, Options.AutomaticAuthenticate))
{
var result = await HandleAuthenticateOnceAsync();
if (result.Failure != null)
if (result?.Failure != null)
{
Logger.AuthenticationSchemeNotAuthenticatedWithFailure(Options.AuthenticationScheme, result.Failure.Message);
}