From: Jeremias Maerki Date: Thu, 28 Nov 2002 16:06:39 +0000 (+0000) Subject: Avoid NPE when options aren't set on the XMLRenderer (Bug 14768) X-Git-Tag: fop-0_20_5rc~30 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=26bd1bb610919dda26e3e52519f73d3fdd615ef9;p=xmlgraphics-fop.git 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 --- 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; + } } /**