Browse Source

Fixed crash then type is null in type def matches.

pull/1515/head
DEVB\darius.kucinskas 6 years ago
parent
commit
aeeaa5c149
  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