]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Thu, 8 Apr 2010 01:19:04 +0000 (01:19 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Thu, 8 Apr 2010 01:19:04 +0000 (01:19 +0000)
magick/profile.c

index 0560c27c0b38c22e1d658b0192fcac200e12316d..f3b02fa81a9af8b4b4e691926fea7da1364d6bc0 100644 (file)
@@ -833,7 +833,8 @@ MagickExport MagickBooleanType ProfileImage(Image *image,const char *name,
 #define ThrowProfileException(severity,tag,context) \
 { \
   (void) cmsCloseProfile(source_profile); \
-  (void) cmsCloseProfile(target_profile); \
+  if (target_profile != (cmsHPROFILE) NULL) \
+    (void) cmsCloseProfile(target_profile); \
   ThrowBinaryException(severity,tag,context); \
 }