Browse Source

Merge pull request #1515 from dkucinskas/master

Fixed crash then type is null in type def matches.
pull/1556/head
Daniel Grunwald 6 years ago committed by GitHub
parent
commit
abe65d47bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs

2
ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs

@ -407,7 +407,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -407,7 +407,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
bool TypeDefMatches(ITypeDefinition typeDef, IType type)
{
if (type.Name != typeDef.Name || type.Namespace != typeDef.Namespace || type.TypeParameterCount != typeDef.TypeParameterCount)
if (type == null || type.Name != typeDef.Name || type.Namespace != typeDef.Namespace || type.TypeParameterCount != typeDef.TypeParameterCount)
return false;
bool defIsNested = typeDef.DeclaringTypeDefinition != null;
bool typeIsNested = type.DeclaringType != null;

Loading…
Cancel
Save