Skip to content

Commit

Permalink
Visual Studio Extension - fixed NullReferenceException crashes
Browse files Browse the repository at this point in the history
Resolves #54
  • Loading branch information
tomasherceg authored and tomasherceg committed Apr 16, 2015
1 parent 2a6ca2c commit adf3fe3
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ private ControlPropertyMetadata GetPropertyMetadata(IPropertySymbol property)

private static bool CheckType(INamedTypeSymbol symbol, Type type)
{
if (symbol is IErrorTypeSymbol || symbol.ContainingNamespace == null || string.IsNullOrWhiteSpace(symbol.Name))
{
return false;
}
return symbol.ContainingNamespace.ToDisplayString() == type.Namespace && symbol.Name == type.Name;
}

Expand Down

0 comments on commit adf3fe3

Please sign in to comment.