diff options
author | maopeixia <maopeixia@163.com> | 2020-08-21 09:58:44 +0300 |
---|---|---|
committer | Joel Martinez <joelmartinez@gmail.com> | 2020-09-02 00:27:01 +0300 |
commit | 9d3693aa064fdf0585ce9abd5c50a70cfe7a3ca6 (patch) | |
tree | fda9534a1fae5cdd5db14652d35fa920e39d4636 /mdoc | |
parent | 1a1806ce4656b8d3f9bed3486cbbddf409d5f69a (diff) |
control null Exception
Diffstat (limited to 'mdoc')
-rw-r--r-- | mdoc/Mono.Documentation/Updater/DocUtils.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mdoc/Mono.Documentation/Updater/DocUtils.cs b/mdoc/Mono.Documentation/Updater/DocUtils.cs index 8248ab4b..718c26c9 100644 --- a/mdoc/Mono.Documentation/Updater/DocUtils.cs +++ b/mdoc/Mono.Documentation/Updater/DocUtils.cs @@ -570,11 +570,19 @@ namespace Mono.Documentation.Updater private static bool IsCompilerGenerated(MemberReference mi)
{
IMemberDefinition memberDefinition = mi.Resolve();
- return memberDefinition.IsSpecialName
+ if (memberDefinition != null)
+ {
+ return memberDefinition.IsSpecialName
|| memberDefinition.CustomAttributes.Any(i =>
i.AttributeType.FullName == Consts.CompilerGeneratedAttribute
|| i.AttributeType.FullName == Consts.CompilationMappingAttribute
);
+ }
+ else
+ {
+ MDocUpdater.Instance.Warning($"IsIgnored->IsCompilerGenerated Unable to Resolve Member('{mi.FullName}')");
+ return false;
+ }
}
public static bool IsAvailablePropertyMethod(MethodDefinition method)
|