Fix nullref in SystemConsoleShouldBeAvoidedAnalyzer

This commit is contained in:
Tyrrrz
2021-03-31 11:28:48 +03:00
parent 6d46e82145
commit 54a4c32ddf
10 changed files with 36 additions and 7 deletions

View File

@@ -22,6 +22,9 @@ namespace CliFx.Analyzers
PropertyDeclarationSyntax propertyDeclaration,
IPropertySymbol property)
{
if (property.ContainingType is null)
return;
if (property.ContainingType.IsAbstract)
return;