diff options
author | Jeremias Maerki <jeremias@apache.org> | 2006-06-27 18:16:31 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2006-06-27 18:16:31 +0000 |
commit | ffc6c6da3f8334083ba3b03e339cf581b7f6babf (patch) | |
tree | 7159bf3c66e73f8046a82201b114e58e76a8531e /src/java/org/apache/fop | |
parent | 3cd0a99a821eae6c76e321e934956b45bb4fdee0 (diff) | |
download | xmlgraphics-fop-ffc6c6da3f8334083ba3b03e339cf581b7f6babf.tar.gz xmlgraphics-fop-ffc6c6da3f8334083ba3b03e339cf581b7f6babf.zip |
Fix NPE in case there are no extension attachments and the area tree was built from the intermediate format.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@417542 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop')
-rw-r--r-- | src/java/org/apache/fop/area/PageViewport.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/area/PageViewport.java b/src/java/org/apache/fop/area/PageViewport.java index e2986855a..e4be2d8e2 100644 --- a/src/java/org/apache/fop/area/PageViewport.java +++ b/src/java/org/apache/fop/area/PageViewport.java @@ -23,6 +23,7 @@ import java.awt.geom.Rectangle2D; import java.io.ObjectOutputStream; import java.io.ObjectInputStream; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.Map; import java.util.HashMap; @@ -563,7 +564,11 @@ public class PageViewport extends AreaTreeObject implements Resolvable, Cloneabl /** @return the list of extension attachments for this page */ public List getExtensionAttachments() { - return this.extensionAttachments; + if (this.extensionAttachments == null) { + return Collections.EMPTY_LIST; + } else { + return this.extensionAttachments; + } } /** @return True if this is a blank page. */ |