Added a null reference check

This commit is contained in:
John Jenko 2015-06-17 14:04:49 +00:00
parent 3045682ed7
commit 82a5480ce2

View File

@ -424,6 +424,8 @@ namespace VEPROMS
XmlDocument xd = new XmlDocument();
xd.LoadXml(c.Config);
XmlNode xn = xd.SelectSingleNode("Config/Procedure/@SectionStart");
if (xn != null)
{
int iid = int.Parse(xn.InnerText);
if (Old2NewItem.ContainsKey(iid))
iid = Old2NewItem[iid];
@ -439,6 +441,7 @@ namespace VEPROMS
xn.InnerText = iid.ToString();
c.Config = xd.OuterXml;
c.Save();
}
}
private void FixFloatingFoldouts()
{
@ -3366,4 +3369,4 @@ namespace VEPROMS
this.Close();
}
}
}
}