]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugfix for NPE when space-before and space-after are used.
authorJeremias Maerki <jeremias@apache.org>
Tue, 26 Jul 2005 07:41:58 +0000 (07:41 +0000)
committerJeremias Maerki <jeremias@apache.org>
Tue, 26 Jul 2005 07:41:58 +0000 (07:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@225249 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java

index 31f067261e6cd90c2b8a64762350bdd51c8d2083..78b1e40e9b1627fbeb8e25e1d85817ccab783530 100644 (file)
@@ -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();