Guard against null ref
This commit is contained in:
parent
4d6ad51f8a
commit
5cd236c1b0
|
|
@ -102,7 +102,7 @@ namespace Microsoft.AspNetCore.Authentication
|
||||||
if (ShouldHandleScheme(AuthenticationManager.AutomaticScheme, Options.AutomaticAuthenticate))
|
if (ShouldHandleScheme(AuthenticationManager.AutomaticScheme, Options.AutomaticAuthenticate))
|
||||||
{
|
{
|
||||||
var result = await HandleAuthenticateOnceAsync();
|
var result = await HandleAuthenticateOnceAsync();
|
||||||
if (result.Failure != null)
|
if (result?.Failure != null)
|
||||||
{
|
{
|
||||||
Logger.AuthenticationSchemeNotAuthenticatedWithFailure(Options.AuthenticationScheme, result.Failure.Message);
|
Logger.AuthenticationSchemeNotAuthenticatedWithFailure(Options.AuthenticationScheme, result.Failure.Message);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue