Skip to content

Commit 5e8bcae

Browse files
committed
Fix NPE because of null parent
DEVSIX-7609
1 parent a22302b commit 5e8bcae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

layout/src/main/java/com/itextpdf/layout/renderer/MulticolRenderer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ public LayoutResult layout(LayoutContext layoutContext) {
9292
if (layoutResult.getSplitRenderers().isEmpty()) {
9393
return new LayoutResult(LayoutResult.NOTHING, null, null, this, layoutResult.getCauseOfNothing());
9494
} else if (layoutResult.getOverflowRenderer() == null) {
95-
this.setChildRenderers(layoutResult.getSplitRenderers());
95+
this.childRenderers.clear();
96+
addAllChildRenderers(layoutResult.getSplitRenderers());
9697
this.occupiedArea = calculateContainerOccupiedArea(layoutContext, true);
9798
return new LayoutResult(LayoutResult.FULL, this.occupiedArea, this, null);
9899
} else {

0 commit comments

Comments
 (0)