B2023-026 Added null reference check when importing a Word document for use as a library document

This commit is contained in:
John Jenko 2023-03-03 15:09:42 +00:00
parent 740c24b8c0
commit ab4b4e8b6d

View File

@ -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)