check for NomaiObject

This commit is contained in:
Noah Pilarski 2022-11-24 18:58:49 -05:00
parent d133cd4709
commit 53474c63c3

View File

@ -717,6 +717,12 @@ namespace NewHorizons.Builder.Props
xmlDocument.LoadXml(xmlPath);
XmlNode rootNode = xmlDocument.SelectSingleNode("NomaiObject");
if (rootNode == null)
{
Logger.LogError($"Couldn't find NomaiObject in [{xmlPath}]");
return dict;
}
foreach (object obj in rootNode.SelectNodes("TextBlock"))
{
XmlNode xmlNode = (XmlNode)obj;