From 314f695990548bb6e3001113169736added4a7c0 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 14 Oct 2020 13:36:35 +0000 Subject: [PATCH] B2020-133 When printing an EOP with the PDF Links option needed to add a check for a null reference when trying to add a link to an enhanced document step that does not exist. --- PROMS/Volian.Print.Library/vlnParagraph.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 73dd1766..d61f1392 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -1127,6 +1127,8 @@ namespace Volian.Print.Library private static void AddLinkToEnhancedDocument(PdfContentByte cb, float yLocation, int itemID, String token, int xLocation) { ItemInfo ii = ItemInfo.Get(itemID); + //B2020-133 if "ii" is null, then the itemid was not found- probable enhanced step was deleted. so just return with out creating a link + if (ii == null) return; string prefix = ii.MyDocVersion.DocVersionConfig.Print_PDFFilePrefix ?? ""; string suffix = ii.MyDocVersion.DocVersionConfig.Print_PDFFileSuffix ?? ""; ColumnText ct = new ColumnText(cb);