C2018-003 corrected use of MyActiveSection vs ActiveSection and added NULL checks
This commit is contained in:
@@ -2099,8 +2099,8 @@ namespace Volian.Print.Library
|
||||
supInfoGroups = new List<List<vlnParagraph>>();
|
||||
foreach (vlnParagraph pg in vlnParagraph.ChildrenBelow)
|
||||
{
|
||||
SectionInfo supInfoSect = pg.MyItemInfo.MyActiveSection as SectionInfo;
|
||||
if (supInfoSect.StepSectPageBreaksForSupInfo != null && supInfoSect.StepSectPageBreaksForSupInfo.Contains(pg.MyItemInfo.ItemID))
|
||||
SectionInfo supInfoSect = (pg.MyItemInfo.ActiveSection != null) ? pg.MyItemInfo.ActiveSection as SectionInfo : null;
|
||||
if (supInfoSect != null && supInfoSect.StepSectPageBreaksForSupInfo != null && supInfoSect.StepSectPageBreaksForSupInfo.Contains(pg.MyItemInfo.ItemID)) // C2018-003 fixed use of getting the active section
|
||||
supInfoGroups.Add(new List<vlnParagraph>()); // add a grouping since a page break exists
|
||||
if (supInfoGroups.Count == 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user