Update Extensions.cs (#2310)

- only catching AssemblyResolutionException
- using null propagation instead of null ref
This commit is contained in:
James Frowen 2020-10-03 01:45:53 +01:00 committed by vis2k
parent b9c0ee144b
commit b33e5228a3

View File

@ -262,9 +262,9 @@ public static IEnumerable<FieldDefinition> FindAllPublicFields(this TypeDefiniti
try
{
typeDefinition = typeDefinition.BaseType.Resolve();
typeDefinition = typeDefinition.BaseType?.Resolve();
}
catch
catch (AssemblyResolutionException)
{
break;
}