From 19b4f603df39410e0478dbf16b4d18a97dcba4f5 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 8 Sep 2017 16:20:14 +0000 Subject: [PATCH] B2017-201 Was getting a NULL reference for SI (Section Info) when generating the approved PDF, if the Summary of Changes was not done with the approval. --- PROMS/Volian.Print.Library/PromsPrinter.cs | 3 +++ PROMS/Volian.Print.Library/vlnParagraph.cs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/PROMS/Volian.Print.Library/PromsPrinter.cs b/PROMS/Volian.Print.Library/PromsPrinter.cs index db2884fc..7235112a 100644 --- a/PROMS/Volian.Print.Library/PromsPrinter.cs +++ b/PROMS/Volian.Print.Library/PromsPrinter.cs @@ -1707,6 +1707,9 @@ namespace Volian.Print.Library if (section.IsStepSection && nxtItem.IsStepSection) { SectionInfo si = nxtItem as SectionInfo; + // B2017-201 if si is null we need to get it via the ItemID + if (si == null) + si = SectionInfo.Get(nxtItem.ItemID); //ActiveSection as SectionInfo; SectionConfig sc = si.SectionConfig; try { diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index f89f2481..6edb1e9d 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -2161,6 +2161,9 @@ namespace Volian.Print.Library // is a single column section. //bool _skipEndMessage = MyPageHelper.MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.One && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.EndForSingle; SectionInfo si = MyItemInfo.MyActiveSection as SectionInfo; + // B2017-201 if si is null we need to get it via the ItemID + if (si == null) + si = SectionInfo.Get(MyItemInfo.MyActiveSection.ItemID); //ActiveSection as SectionInfo; bool _skipEndMessage = si.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.One && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.EndForSingle; bool _lastSect = true; if (si.MyActiveParent.IsSection) // is this meta/subsection. Only put end message out on last section