aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/layoutmgr/AreaAdditionUtil.java
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2006-05-18 18:58:05 +0000
committerJeremias Maerki <jeremias@apache.org>2006-05-18 18:58:05 +0000
commit7f020cc606a2c6260f0f42ab4e1b0ce2e18b8159 (patch)
tree0a3d46f33ad60be1a43ffd975802f7f5819b4237 /src/java/org/apache/fop/layoutmgr/AreaAdditionUtil.java
parent51f386f11090205b5a801c178f3d3296771c4e67 (diff)
downloadxmlgraphics-fop-7f020cc606a2c6260f0f42ab4e1b0ce2e18b8159.tar.gz
xmlgraphics-fop-7f020cc606a2c6260f0f42ab4e1b0ce2e18b8159.zip
Bugfix: NullPointerException in AreaAdditionUtil in a table-cell spanning multiple pages and with a marker.
Note: This is a hack to avoid the NPE. A problem remains. The markers will not be added if the first/last conditions cannot be determined. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@407614 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/AreaAdditionUtil.java')
-rw-r--r--src/java/org/apache/fop/layoutmgr/AreaAdditionUtil.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/AreaAdditionUtil.java b/src/java/org/apache/fop/layoutmgr/AreaAdditionUtil.java
index a210754af..866b8236d 100644
--- a/src/java/org/apache/fop/layoutmgr/AreaAdditionUtil.java
+++ b/src/java/org/apache/fop/layoutmgr/AreaAdditionUtil.java
@@ -85,6 +85,13 @@ public class AreaAdditionUtil {
// pos was created by this LM, so it must be ignored
}
}
+ if (firstPos == null) {
+ return; //Nothing to do, return early
+ //TODO This is a hack to avoid an NPE in the code block below.
+ //If there's no firstPos/lastPos there's currently no way to
+ //correctly determine first and last conditions. The Iterator
+ //doesn't give us that info.
+ }
if (bslm != null && bslm.markers != null) {
bslm.getCurrentPV().addMarkers(bslm.markers, true,