From ae5491af3cc873c6fa366674dd214450397adef6 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Tue, 24 Jan 2006 14:15:36 +0000 Subject: [PATCH] Fix for NPE when the AWT Viewer is used with an area tree file as input. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@371919 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/area/PageViewport.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/fop/area/PageViewport.java b/src/java/org/apache/fop/area/PageViewport.java index 51c354b4d..88a52dc7a 100644 --- a/src/java/org/apache/fop/area/PageViewport.java +++ b/src/java/org/apache/fop/area/PageViewport.java @@ -105,7 +105,9 @@ public class PageViewport implements Resolvable, Cloneable { * @param original the original PageViewport to copy from */ public PageViewport(PageViewport original) { - this.extensionAttachments = new java.util.ArrayList(original.extensionAttachments); + if (original.extensionAttachments != null) { + this.extensionAttachments = new java.util.ArrayList(original.extensionAttachments); + } this.pageNumber = original.pageNumber; this.pageNumberString = original.pageNumberString; this.page = (Page)original.page.clone(); -- 2.39.5