poppler/GfxState.cc |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 1a69d9638214943b3c2278f570694d9722a5de15
Author: Albert Astals Cid <[email protected]>
Date:   Wed May 20 23:58:44 2009 +0200

    Do not create the GfxColorTransform if the lcms could not be created
    
    Fixes crash on pdf from bug 20108

diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index 8fcc7a0..361060c 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -1560,16 +1560,20 @@ GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr) 
{
             CHANNELS_SH(dNChannels) | BYTES_SH(1),
          INTENT_RELATIVE_COLORIMETRIC,0)) == 0) {
       error(-1, "Can't create transform");
+      cs->transform = NULL;
+    } else {
+      cs->transform = new GfxColorTransform(transform);
     }
-    cs->transform = new GfxColorTransform(transform);
     if (dcst == PT_RGB) {
        // create line transform only when the display is RGB type color space 
       if ((transform = cmsCreateTransform(hp,
            CHANNELS_SH(nCompsA) | BYTES_SH(1),dhp,
            TYPE_RGB_8,INTENT_RELATIVE_COLORIMETRIC,0)) == 0) {
        error(-1, "Can't create transform");
+       cs->lineTransform = NULL;
+      } else {
+       cs->lineTransform = new GfxColorTransform(transform);
       }
-      cs->lineTransform = new GfxColorTransform(transform);
     }
     cmsCloseProfile(hp);
   }
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to