Author: jeremias
Date: Fri Apr 22 08:58:55 2011
New Revision: 1095895

URL: http://svn.apache.org/viewvc?rev=1095895&view=rev
Log:
Fix a potential NPE which can apparently happen in very exotic cases (actually, 
it rather points to a Java class library bug).

Modified:
    
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java

Modified: 
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java?rev=1095895&r1=1095894&r2=1095895&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java
 (original)
+++ 
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java
 Fri Apr 22 08:58:55 2011
@@ -127,7 +127,12 @@ public abstract class AbstractImageAdapt
                 pdfICCStream = cs.getICCStream();
             }
         } else {
-            if (cs == null && desc.startsWith("sRGB")) {
+            if (cs == null) {
+                if (desc == null || !desc.startsWith("sRGB")) {
+                    log.warn("The default sRGB profile was indicated,"
+                            + " but the profile description does not match 
what was expected: "
+                            + desc);
+                }
                 //It's the default sRGB profile which we mapped to DefaultRGB 
in PDFRenderer
                 cs = (PDFICCBasedColorSpace)doc.getResources().getColorSpace(
                         new PDFName("DefaultRGB"));



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

Reply via email to