]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
removed possible null reference
authorMaximilian Berger <maxberger@apache.org>
Tue, 15 Sep 2009 14:02:48 +0000 (14:02 +0000)
committerMaximilian Berger <maxberger@apache.org>
Tue, 15 Sep 2009 14:02:48 +0000 (14:02 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@815330 13f79535-47bb-0310-9956-ffa450edef68

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

index cbaac4e5540f39a53f0d944670b024f16a5e295e..165236359abfe42c85f1f774af9ef9f671ab92a3 100644 (file)
@@ -129,12 +129,12 @@ public abstract class AbstractImageAdapter implements PDFImage {
             if (cs == null && desc.startsWith("sRGB")) {
                 //It's the default sRGB profile which we mapped to DefaultRGB in PDFRenderer
                 cs = doc.getResources().getColorSpace("DefaultRGB");
-                if (cs == null) {
-                    //sRGB hasn't been set up for the PDF document
-                    //so install but don't set to DefaultRGB
-                    cs = PDFICCBasedColorSpace.setupsRGBColorSpace(doc);
-                }
             }
+            if (cs == null) {
+                // sRGB hasn't been set up for the PDF document
+                // so install but don't set to DefaultRGB
+                cs = PDFICCBasedColorSpace.setupsRGBColorSpace(doc);
+            }            
             pdfICCStream = cs.getICCStream();
         }
         return pdfICCStream;