From fd31d5a24580c40858d67f7907c64105527e00ef Mon Sep 17 00:00:00 2001 From: John Date: Fri, 12 Jun 2020 19:21:59 +0000 Subject: [PATCH] B2020-084 Logic to load formats from procedure set export files that were generated prior to User Control of Format. --- PROMS/VEPROMS User Interface/dlgExportImport.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index 7e70693a..a10ac93b 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -999,7 +999,14 @@ namespace VEPROMS string config = null; XmlNode cfg = nd.Attributes.GetNamedItem("config"); if (cfg != null) config = cfg.InnerText; - string pname = nd.Attributes.GetNamedItem("pname").InnerText; + // B2020-084 GetNmaedItems was returning a null for pname. + // Only get the pname text if the pname attribute is found + // If there is no pname, then don't try to process and continue on with the next XML Node in the node list + string pname = null; + XmlNode pnameAttrib = nd.Attributes.GetNamedItem("pname"); + if (pnameAttrib != null) + pname = pnameAttrib.InnerText; + if (pname == null) continue; string description = null; XmlNode descript = nd.Attributes.GetNamedItem("description"); if (descript != null) description = descript.InnerText;