Author: jeremias
Date: Thu Apr  9 07:44:59 2009
New Revision: 763549

URL: http://svn.apache.org/viewvc?rev=763549&view=rev
Log:
Bugzilla #46974:
Possible NPE fixed in PDFImageHandlerRawJPEG.handleImage().
Submitted by: Jost Klopfstein <jost.klopfstein.at.gmail.com>

Modified:
    
xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFImageHandlerRawJPEG.java

Modified: 
xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFImageHandlerRawJPEG.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFImageHandlerRawJPEG.java?rev=763549&r1=763548&r2=763549&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFImageHandlerRawJPEG.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFImageHandlerRawJPEG.java
 Thu Apr  9 07:44:59 2009
@@ -84,7 +84,7 @@
         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 {



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to