diff options
author | Andreas L. Delmelle <adelmelle@apache.org> | 2015-07-11 17:52:10 +0000 |
---|---|---|
committer | Andreas L. Delmelle <adelmelle@apache.org> | 2015-07-11 17:52:10 +0000 |
commit | 4cd8159bff58dc23916041a733523f5bd35e7ffb (patch) | |
tree | aeab0f276f0698c88d6370a8d09e7284eb597617 | |
parent | 6bd5f26e528912fdcf42255286e9d5af4905bed7 (diff) | |
download | xmlgraphics-fop-4cd8159bff58dc23916041a733523f5bd35e7ffb.tar.gz xmlgraphics-fop-4cd8159bff58dc23916041a733523f5bd35e7ffb.zip |
Preliminary quick fix for FOP-2461
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1690396 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java b/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java index 16abdb527..46a93b3f5 100644 --- a/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java @@ -393,7 +393,8 @@ public class ListItemLayoutManager extends SpacedBorderedPaddedBlockLayoutManage int breakClass = EN_AUTO; KnuthElement endEl = elementLists[0].size() > 0 ? (KnuthElement) elementLists[0].get(end[0]) : null; - Position originalLabelPosition = endEl != null ? endEl.getPosition().getPosition() : null; + Position originalLabelPosition = + (endEl != null && endEl.getPosition() != null) ? endEl.getPosition().getPosition() : null; if (endEl instanceof KnuthPenalty) { additionalPenaltyHeight = endEl.getWidth(); stepPenalty = endEl.getPenalty() == -KnuthElement.INFINITE ? -KnuthElement.INFINITE : Math @@ -402,7 +403,8 @@ public class ListItemLayoutManager extends SpacedBorderedPaddedBlockLayoutManage ((KnuthPenalty) endEl).getBreakClass()); } endEl = elementLists[1].size() > 0 ? (KnuthElement) elementLists[1].get(end[1]) : null; - Position originalBodyPosition = endEl != null ? endEl.getPosition().getPosition() : null; + Position originalBodyPosition = + (endEl != null && endEl.getPosition() != null) ? endEl.getPosition().getPosition() : null; if (endEl instanceof KnuthPenalty) { additionalPenaltyHeight = Math.max( additionalPenaltyHeight, endEl.getWidth()); |