aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-05-18 08:59:36 +0000
committerJeremias Maerki <jeremias@apache.org>2005-05-18 08:59:36 +0000
commit095b06900c630603280a68b259119a8ae4c93406 (patch)
tree57a1e3cb3cf7ba5cc06171389cdd4485f95f0fbb /src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
parente348b4397332cf1e3469c28ab34ebaf35458be14 (diff)
downloadxmlgraphics-fop-095b06900c630603280a68b259119a8ae4c93406.tar.gz
xmlgraphics-fop-095b06900c630603280a68b259119a8ae4c93406.zip
Handle empty inlines/blocks better.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198647 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java')
-rw-r--r--src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
index 6e6e6fdc0..335e882ab 100644
--- a/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
@@ -232,7 +232,8 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
// get elements from curLM
returnedList = curLM.getNextKnuthElements(childLC, alignment);
- if (returnedList.size() == 1
+ if (returnedList != null
+ && returnedList.size() == 1
&& ((KnuthElement) returnedList.getFirst()).isPenalty()
&& ((KnuthPenalty) returnedList.getFirst()).getP() == -KnuthElement.INFINITE) {
// a descendant of this block has break-before
@@ -281,7 +282,7 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
// a penalty
}
}
- if (returnedList.size() == 0) {
+ if (returnedList == null || returnedList.size() == 0) {
//Avoid NoSuchElementException below (happens with empty blocks)
continue;
}