Skip to content

Commit

Permalink
Fix NRE
Browse files Browse the repository at this point in the history
  • Loading branch information
Hosch250 committed Apr 26, 2016
1 parent 29b646e commit 7b3ed9e
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ private void AnalyzeNode(SyntaxNodeAnalysisContext context)
}

var methodSymbol = context.SemanticModel.GetDeclaredSymbol(methodDeclaration).OverriddenMethod;

// this will happen if the base class is deleted and there are still references to it in the derived class
if (methodSymbol == null)
{
return;
}

while (methodSymbol.IsOverride)
{
methodSymbol = methodSymbol.OverriddenMethod;
Expand Down

0 comments on commit 7b3ed9e

Please sign in to comment.