From ab4b4e8b6dbfd7eb812bb773b2f5b7e02fc86406 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 3 Mar 2023 15:09:42 +0000 Subject: [PATCH] B2023-026 Added null reference check when importing a Word document for use as a library document --- PROMS/VEPROMS User Interface/frmVEPROMS.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index 706b20fe..a5baf6f2 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -1307,14 +1307,17 @@ namespace VEPROMS if (myDTI.MyDSOTabPanel != null) { DSOTabPanel myDTP = myDTI.MyDSOTabPanel; - - if (myDTP.MyDisplayTabItem.MyItemInfo.MyDocVersion.DocVersionAssociations == null) + // B2023-026 needed to check for a null itemInfo + if (myDTP.MyDisplayTabItem.MyItemInfo != null) { - SelectedROFst = null; // B2020-071 ROs are not associated with this procedure set. Set value to null so that PROMS does not try to generate the RO tree in Step Properties. - } - else - { - SelectedROFst = myDTP.MyDisplayTabItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst; + if (myDTP.MyDisplayTabItem.MyItemInfo.MyDocVersion.DocVersionAssociations == null) + { + SelectedROFst = null; // B2020-071 ROs are not associated with this procedure set. Set value to null so that PROMS does not try to generate the RO tree in Step Properties. + } + else + { + SelectedROFst = myDTP.MyDisplayTabItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst; + } } } else if (tc.MyEditItem != null && displayRO.MyROFST != null && tc.MyEditItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].ROFstID != displayRO.MyROFST.ROFstID)