diff options
author | Jeremias Maerki <jeremias@apache.org> | 2009-10-02 15:41:31 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2009-10-02 15:41:31 +0000 |
commit | 648f47b7f4571f34884efb14ca547d4561c458d5 (patch) | |
tree | 70d3f127af83ab1adb16359bf0b9cb9df6222c94 /src/java/org/apache/fop/render/bitmap/AbstractBitmapDocumentHandler.java | |
parent | 7cc06986c0f4ed07c17604642248437a4ce0569a (diff) | |
download | xmlgraphics-fop-648f47b7f4571f34884efb14ca547d4561c458d5.tar.gz xmlgraphics-fop-648f47b7f4571f34884efb14ca547d4561c458d5.zip |
Fixed possible NPE.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@821064 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/bitmap/AbstractBitmapDocumentHandler.java')
-rw-r--r-- | src/java/org/apache/fop/render/bitmap/AbstractBitmapDocumentHandler.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/java/org/apache/fop/render/bitmap/AbstractBitmapDocumentHandler.java b/src/java/org/apache/fop/render/bitmap/AbstractBitmapDocumentHandler.java index e4606858b..0577a737a 100644 --- a/src/java/org/apache/fop/render/bitmap/AbstractBitmapDocumentHandler.java +++ b/src/java/org/apache/fop/render/bitmap/AbstractBitmapDocumentHandler.java @@ -307,13 +307,14 @@ public abstract class AbstractBitmapDocumentHandler extends AbstractBinaryWritin = BitmapRendererEventProducer.Provider.get( getUserAgent().getEventBroadcaster()); eventProducer.stoppingAfterFirstPageNoFilename(this); - } - try { - this.imageWriter.writeImage( - this.currentImage, out, - getSettings().getWriterParams()); - } finally { - IOUtils.closeQuietly(out); + } else { + try { + this.imageWriter.writeImage( + this.currentImage, out, + getSettings().getWriterParams()); + } finally { + IOUtils.closeQuietly(out); + } } } } else { |