Added a null reference check
This commit is contained in:
parent
3045682ed7
commit
82a5480ce2
@ -424,6 +424,8 @@ namespace VEPROMS
|
|||||||
XmlDocument xd = new XmlDocument();
|
XmlDocument xd = new XmlDocument();
|
||||||
xd.LoadXml(c.Config);
|
xd.LoadXml(c.Config);
|
||||||
XmlNode xn = xd.SelectSingleNode("Config/Procedure/@SectionStart");
|
XmlNode xn = xd.SelectSingleNode("Config/Procedure/@SectionStart");
|
||||||
|
if (xn != null)
|
||||||
|
{
|
||||||
int iid = int.Parse(xn.InnerText);
|
int iid = int.Parse(xn.InnerText);
|
||||||
if (Old2NewItem.ContainsKey(iid))
|
if (Old2NewItem.ContainsKey(iid))
|
||||||
iid = Old2NewItem[iid];
|
iid = Old2NewItem[iid];
|
||||||
@ -440,6 +442,7 @@ namespace VEPROMS
|
|||||||
c.Config = xd.OuterXml;
|
c.Config = xd.OuterXml;
|
||||||
c.Save();
|
c.Save();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
private void FixFloatingFoldouts()
|
private void FixFloatingFoldouts()
|
||||||
{
|
{
|
||||||
foreach (int key in floatFoldout.Keys)
|
foreach (int key in floatFoldout.Keys)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user