Skip to content

Commit

Permalink
Fix null reference exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss committed Nov 2, 2024
1 parent ff0b1ce commit 362913d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ abstract class GenericOAuthValidator : IOAuthValidator
public abstract OAuthProvider Provider { get; }

/// <inheritdoc />
public OAuthGatewayStatus GatewayStatus => OAuthConfiguration.Gateway!.Value;
public OAuthGatewayStatus GatewayStatus => OAuthConfiguration.Gateway ?? OAuthGatewayStatus.Disabled;

/// <summary>
/// The <see cref="ILogger"/> for the <see cref="GenericOAuthValidator"/>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ sealed class GitHubOAuthValidator : IOAuthValidator
public OAuthProvider Provider => OAuthProvider.GitHub;

/// <inheritdoc />
public OAuthGatewayStatus GatewayStatus => oAuthConfiguration.Gateway!.Value;
public OAuthGatewayStatus GatewayStatus => oAuthConfiguration.Gateway ?? OAuthGatewayStatus.Disabled;

/// <summary>
/// The <see cref="IGitHubServiceFactory"/> for the <see cref="GitHubOAuthValidator"/>.
Expand Down

0 comments on commit 362913d

Please sign in to comment.