this shit has been bothering me for a month lol

This commit is contained in:
JohnCorby 2023-08-25 22:18:57 -07:00
parent 553e48e4e9
commit 2d452feb87

View File

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