diff options
author | Jeremias Maerki <jeremias@apache.org> | 2011-04-22 08:58:55 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2011-04-22 08:58:55 +0000 |
commit | a7a5c39253fdf7a3c709f9af01c6308cb31e9ed1 (patch) | |
tree | 754bc06fd4196934b1b62c4a0b88a271e22780be /src | |
parent | afda1f3897038166beeb7794b35280eac00bb261 (diff) | |
download | xmlgraphics-fop-a7a5c39253fdf7a3c709f9af01c6308cb31e9ed1.tar.gz xmlgraphics-fop-a7a5c39253fdf7a3c709f9af01c6308cb31e9ed1.zip |
Fix a potential NPE which can apparently happen in very exotic cases (actually, it rather points to a Java class library bug).
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1095895 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java b/src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java index d076e6ab9..59d3930f7 100644 --- a/src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java +++ b/src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java @@ -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")); |