From: Jeremias Maerki Date: Tue, 26 Jul 2005 07:41:58 +0000 (+0000) Subject: Bugfix for NPE when space-before and space-after are used. X-Git-Tag: fop-0_90-alpha1~478 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b5d1038d5ea31add5ba276f5379fa95fdc345c5d;p=xmlgraphics-fop.git Bugfix for NPE when space-before and space-after are used. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@225249 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java b/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java index 31f067261..78b1e40e9 100644 --- a/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java @@ -146,7 +146,8 @@ public class ListBlockLayoutManager extends BlockStackingLayoutManager { lastPos = pos; } if (pos instanceof NonLeafPosition - && ((NonLeafPosition) pos).getPosition().getLM() != this) { + && (pos.getPosition() != null) + && ((NonLeafPosition) pos).getPosition().getLM() != this) { // pos was created by a child of this ListBlockLM positionList.add(((NonLeafPosition) pos).getPosition()); lastLM = ((NonLeafPosition) pos).getPosition().getLM();