Fix case of empty mappings

This commit is contained in:
Matt Nadareski
2016-04-21 14:12:14 -07:00
parent 0390144419
commit 8e5a1365b5

View File

@@ -72,6 +72,12 @@ namespace SabreTools.Helper
node = node.NextSibling;
}
// If the node is empty, just return so it doesn't crash
if (!node.HasChildNodes)
{
return;
}
// Get the first mapping node
node = node.FirstChild;
while (node.NodeType != XmlNodeType.Element && node.Name != "mapping")