]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fix a potential NPE which can apparently happen in very exotic cases (actually, it...
authorJeremias Maerki <jeremias@apache.org>
Fri, 22 Apr 2011 08:58:55 +0000 (08:58 +0000)
committerJeremias Maerki <jeremias@apache.org>
Fri, 22 Apr 2011 08:58:55 +0000 (08:58 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1095895 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java

index d076e6ab939e9d171ebe4717723603f3412a95e3..59d3930f7afa32d0c294c3ba84424d3087bc2768 100644 (file)
@@ -127,7 +127,12 @@ public abstract class AbstractImageAdapter implements PDFImage {
                 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"));