diff options
author | Jeremias Maerki <jeremias@apache.org> | 2009-04-09 07:44:59 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2009-04-09 07:44:59 +0000 |
commit | 5a2e8bf69db14f444854233333b3b3918e0061b1 (patch) | |
tree | 0b5d98352a2331d93e79f5591f8b591710866262 /src/java/org/apache/fop/render/pdf | |
parent | 863f9e143a65ce4f4335d9dcde55bbbb90bc4502 (diff) | |
download | xmlgraphics-fop-5a2e8bf69db14f444854233333b3b3918e0061b1.tar.gz xmlgraphics-fop-5a2e8bf69db14f444854233333b3b3918e0061b1.zip |
Bugzilla #46974:
Possible NPE fixed in PDFImageHandlerRawJPEG.handleImage().
Submitted by: Jost Klopfstein <jost.klopfstein.at.gmail.com>
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_Accessibility@763549 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/pdf')
-rw-r--r-- | src/java/org/apache/fop/render/pdf/PDFImageHandlerRawJPEG.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/render/pdf/PDFImageHandlerRawJPEG.java b/src/java/org/apache/fop/render/pdf/PDFImageHandlerRawJPEG.java index 925d63bc5..fe3a00aa8 100644 --- a/src/java/org/apache/fop/render/pdf/PDFImageHandlerRawJPEG.java +++ b/src/java/org/apache/fop/render/pdf/PDFImageHandlerRawJPEG.java @@ -84,7 +84,7 @@ public class PDFImageHandlerRawJPEG implements PDFImageHandler, ImageHandler { float h = (float)pos.getHeight() / 1000f; if (context.getUserAgent().isAccessibilityEnabled()) { String structElemType = pdfContext.getStructElemType(); - if (structElemType.length() > 0) { + if (structElemType != null && structElemType.length() > 0) { int sequenceNum = pdfContext.getSequenceNum(); generator.placeImage(x, y, w, h, xobj, structElemType, sequenceNum); } else { |