From 345150938ab9ef36b9ad7ac6d6dea00494995f43 Mon Sep 17 00:00:00 2001 From: Chris Bowditch Date: Mon, 25 Feb 2013 14:19:46 +0000 Subject: FOP-2215; NullPointerException when generating IF with fox:external-document Submitted by Simon Steiner (ssteiner.at.thunderhead.com) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1449718 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/render/intermediate/IFSerializer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/java/org/apache/fop/render/intermediate/IFSerializer.java b/src/java/org/apache/fop/render/intermediate/IFSerializer.java index f8882f1e0..0a20437c0 100644 --- a/src/java/org/apache/fop/render/intermediate/IFSerializer.java +++ b/src/java/org/apache/fop/render/intermediate/IFSerializer.java @@ -294,7 +294,10 @@ implements IFConstants, IFPainter, IFDocumentNavigationHandler { AttributesImpl atts = new AttributesImpl(); addAttribute(atts, "index", Integer.toString(index)); addAttribute(atts, "name", name); - addAttribute(atts, "page-master-name", pageMasterName); + if (pageMasterName != null) { + //fox:external-document doesn't have a page-master + addAttribute(atts, "page-master-name", pageMasterName); + } addAttribute(atts, "width", Integer.toString(size.width)); addAttribute(atts, "height", Integer.toString(size.height)); addForeignAttributes(atts); -- cgit v1.2.3