B2020-069: Crash when deleting Working Draft

This commit is contained in:
Kathy Ruffing 2020-05-11 15:32:29 +00:00
parent 572e94700a
commit b473844dcc

View File

@ -125,8 +125,9 @@ namespace VEPROMS.CSLA.Library
} }
public void RemoveEnhancedLink(int dvid) public void RemoveEnhancedLink(int dvid)
{ {
// from this config, remove the link to the input dvid: // from this config, remove the link to the input dvid (DocVersionId:
XmlNode xnx = _Xp.XmlContents.SelectSingleNode(string.Format("//Enhanced[@VersionID='{0}']", dvid)); XmlNode xnx = _Xp.XmlContents.SelectSingleNode(string.Format("//Enhanced[@VersionID='{0}']", dvid));
if (xnx == null) return; // B2020-069: check for null reference before accessing xnx.
xnx.ParentNode.RemoveChild(xnx); xnx.ParentNode.RemoveChild(xnx);
} }
private DVEnhancedDocuments _MyEnhancedDocuments = null; private DVEnhancedDocuments _MyEnhancedDocuments = null;