]> granicus.if.org Git - imagemagick/commitdiff
Fix ‘exception’ may be used uninitialized warning
authorCristy <urban-warrior@imagemagick.org>
Wed, 6 Jul 2016 18:00:18 +0000 (14:00 -0400)
committerCristy <urban-warrior@imagemagick.org>
Wed, 6 Jul 2016 18:00:18 +0000 (14:00 -0400)
MagickCore/profile.c

index bc8b8d70fff44e79cf2901a2e22fb612b1398b1b..ea76057700b987ad268adfb01dca1264bf59ccb0 100644 (file)
@@ -435,13 +435,13 @@ static void CMSExceptionHandler(cmsContext context,cmsUInt32Number severity,
   Image
     *image;
 
-  image=(Image *) NULL;
   cms_exception=(CMSExceptionInfo *) context;
-  if (cms_exception != (CMSExceptionInfo *) NULL)
-    {
-      image=cms_exception->image;
-      exception=cms_exception->exception;
-    }
+  if (cms_exception == (CMSExceptionInfo *) NULL)
+    return;
+  exception=cms_exception->exception;
+  if (exception == (ExceptionInfo *) NULL)
+    return;
+  image=cms_exception->image;
   if (image == (Image *) NULL)
     {
       (void) ThrowMagickException(exception,GetMagickModule(),ImageWarning,