From b473844dccca5c7ba27ae62fe2aa7f30fe3420b2 Mon Sep 17 00:00:00 2001 From: Kathy Date: Mon, 11 May 2020 15:32:29 +0000 Subject: [PATCH] B2020-069: Crash when deleting Working Draft --- PROMS/VEPROMS.CSLA.Library/Config/DocVersionConfig.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Config/DocVersionConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/DocVersionConfig.cs index 11629d68..3fb5da71 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/DocVersionConfig.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/DocVersionConfig.cs @@ -125,8 +125,9 @@ namespace VEPROMS.CSLA.Library } 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)); + if (xnx == null) return; // B2020-069: check for null reference before accessing xnx. xnx.ParentNode.RemoveChild(xnx); } private DVEnhancedDocuments _MyEnhancedDocuments = null;