Guard against null

This commit is contained in:
Hao Kung 2017-07-05 13:33:39 -07:00
parent 596822f676
commit 98eb31194c
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ namespace Microsoft.AspNetCore.Authentication
}
var result = await handler.AuthenticateAsync();
if (result.Succeeded)
if (result?.Succeeded)
{
var transformed = await Transform.TransformAsync(result.Principal);
return AuthenticateResult.Success(new AuthenticationTicket(transformed, result.Properties, result.Ticket.AuthenticationScheme));