Skip to content

Commit

Permalink
Merge pull request #375 from StefanMaron/development
Browse files Browse the repository at this point in the history
Mitigate possible NullReferenceException
  • Loading branch information
Arthurvdv authored Nov 27, 2023
2 parents dd760a1 + 8ccc24f commit e80b793
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Design/Rule0028CodeNavigabilityOnEventSubscribers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private void CodeNavigabilityOnEventSubscribers(CodeBlockAnalysisContext context

// Support for using Identifiers instead of Literals in event subscribers is supported from runtime versions: '11.0' or greater.
var manifest = AppSourceCopConfigurationProvider.GetManifest(context.SemanticModel.Compilation);
if (manifest.Runtime < RuntimeVersion.Spring2023) return;
if (manifest is null || manifest.Runtime < RuntimeVersion.Spring2023) return;

context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0028CodeNavigabilityOnEventSubscribers, context.OwningSymbol.GetLocation()));
}
Expand Down

0 comments on commit e80b793

Please sign in to comment.