Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/api-doc-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc/Mono.Documentation/Updater/DocUtils.cs')
-rw-r--r--mdoc/Mono.Documentation/Updater/DocUtils.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/mdoc/Mono.Documentation/Updater/DocUtils.cs b/mdoc/Mono.Documentation/Updater/DocUtils.cs
index 4e47a3f4..8af7befd 100644
--- a/mdoc/Mono.Documentation/Updater/DocUtils.cs
+++ b/mdoc/Mono.Documentation/Updater/DocUtils.cs
@@ -270,12 +270,14 @@ namespace Mono.Documentation.Updater
bool removed = true;
foreach (var nchild in n.ChildNodes.Cast<XmlNode>().ToArray())
{
+ if (nchild == null) continue;
+
if (depth == 0)
{
// check the first level children to see if there's an incoming node that matches
- var avalues = nchild.Attributes.Cast<XmlAttribute>().Select(a => $"@{a.Name}='{a.Value}'").ToArray();
+ var avalues = nchild.Attributes?.Cast<XmlAttribute>().Select(a => $"@{a.Name}='{a.Value}'").ToArray();
var nodexpath = $"./{nchild.Name}";
- if (avalues.Length > 0)
+ if (avalues?.Length > 0)
nodexpath += $"[{ string.Join(" AND ", avalues) }]";
var incomingEquivalent = incoming.SelectSingleNode(nodexpath);
if (incomingEquivalent != null)