From 26bd1bb610919dda26e3e52519f73d3fdd615ef9 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Thu, 28 Nov 2002 16:06:39 +0000 Subject: [PATCH] Avoid NPE when options aren't set on the XMLRenderer (Bug 14768) Submitted by: Matthias Brunner git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_20_2-maintain@195646 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/render/xml/XMLRenderer.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/org/apache/fop/render/xml/XMLRenderer.java b/src/org/apache/fop/render/xml/XMLRenderer.java index b4d98daf3..f7e8b3f44 100644 --- a/src/org/apache/fop/render/xml/XMLRenderer.java +++ b/src/org/apache/fop/render/xml/XMLRenderer.java @@ -495,7 +495,15 @@ public class XMLRenderer implements Renderer { } private boolean isCoarseXml() { - return ((Boolean)options.get("fineDetail")).booleanValue(); + if (options == null) { + return false; + } + Boolean b = (Boolean)options.get("fineDetail"); + if (b != null) { + return b.booleanValue(); + } else { + return false; + } } /** -- 2.39.5