From b5d1038d5ea31add5ba276f5379fa95fdc345c5d Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Tue, 26 Jul 2005 07:41:58 +0000 Subject: [PATCH] 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 --- .../org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); -- 2.39.5