aboutsummaryrefslogtreecommitdiffstats
path: root/fop-core/src/main
diff options
context:
space:
mode:
authorSimon Steiner <ssteiner@apache.org>2024-07-15 10:15:16 +0100
committerSimon Steiner <ssteiner@apache.org>2024-07-15 10:15:16 +0100
commitc04cbfb5cf645a4b81fd107a4b300c2d9202b016 (patch)
tree56802008735d09ef4933f51208c48bab6ddafbf4 /fop-core/src/main
parent639d5b608224d566443a21efd85432a1dddb734a (diff)
downloadxmlgraphics-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.java2
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.