浏览代码

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
tags/fop-1_1rc1old
Jeremias Maerki 13 年前
父节点
当前提交
a7a5c39253
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6
    1
      src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java

+ 6
- 1
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"));

正在加载...
取消
保存