diff options
author | Simon Steiner <ssteiner@apache.org> | 2024-07-15 10:15:16 +0100 |
---|---|---|
committer | Simon Steiner <ssteiner@apache.org> | 2024-07-15 10:15:16 +0100 |
commit | c04cbfb5cf645a4b81fd107a4b300c2d9202b016 (patch) | |
tree | 56802008735d09ef4933f51208c48bab6ddafbf4 /fop-core/src/main | |
parent | 639d5b608224d566443a21efd85432a1dddb734a (diff) | |
download | xmlgraphics-fop-c04cbfb5cf645a4b81fd107a4b300c2d9202b016.tar.gz xmlgraphics-fop-c04cbfb5cf645a4b81fd107a4b300c2d9202b016.zip |
FOP-3190: NPE when list item is split alongside an ipd change by João André Gonçalves
Diffstat (limited to 'fop-core/src/main')
-rw-r--r-- | fop-core/src/main/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java index 3857ef070..bc54fa1da 100644 --- a/fop-core/src/main/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java +++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java @@ -437,7 +437,7 @@ public class ListItemLayoutManager extends SpacedBorderedPaddedBlockLayoutManage addedBoxHeight += boxHeight; ListItemPosition stepPosition = new ListItemPosition(this, start[0], end[0], start[1], end[1]); stepPosition.setOriginalLabelPosition(originalLabelPosition); - if (originalBodyPosition != null && originalBodyPosition.getLM() instanceof ListItemContentLayoutManager) { + if (originalBodyPosition == null || originalBodyPosition.getLM() instanceof ListItemContentLayoutManager) { // Happens when ListItem has multiple blocks and a block (that's not the last block) ends at the same // page height as a IPD change (e.g. FOP-3098). originalBodyPosition (reset) position needs to be a // Block so that BlockStackingLayoutManager can stack it. Lookahead to find next Block. |