]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 18 May 2014 17:37:00 +0000 (17:37 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 18 May 2014 17:37:00 +0000 (17:37 +0000)
MagickCore/xwindow.c
coders/cut.c
coders/scr.c

index a9ec377c48d3528eeefeb5efdf5c25f539f0aec7..29a1907c57372d3ebb9b86eee9144b8c9d695f0c 100644 (file)
@@ -5614,12 +5614,9 @@ MagickPrivate MagickBooleanType XMakeImage(Display *display,
           window->shared_memory=MagickFalse;
           if (status != False)
             XShmDetach(display,&segment_info[1]);
-          if (ximage != (XImage *) NULL)
-            {
-              ximage->data=NULL;
-              XDestroyImage(ximage);
-              ximage=(XImage *) NULL;
-            }
+          ximage->data=NULL;
+          XDestroyImage(ximage);
+          ximage=(XImage *) NULL;
           if (segment_info[1].shmid >= 0)
             {
               if (segment_info[1].shmaddr != NULL)
index d09af03aa5477092289134202cdd7795c3aa0e8c..855b3a9b79a6fe69ba4769a5d14c4ecdec357753 100644 (file)
@@ -248,6 +248,8 @@ static int GetCutColors(Image *image,ExceptionInfo *exception)
   for (y=0; y < (ssize_t) image->rows; y++)
   {
     q=GetAuthenticPixels(image,0,y,image->columns,1,exception);
+    if (q == (Quantum *) NULL)
+      break;
     for (x=0; x < (ssize_t) image->columns; x++)
     {
       if (intensity < GetPixelRed(image,q))
index 0ad58ec731f8893b915388bc3666cf629f2fbe8a..83899923db352c1db45b8dcddb26f980ded27ff9 100644 (file)
@@ -213,6 +213,8 @@ static Image *ReadSCRImage(const ImageInfo *image_info,ExceptionInfo *exception)
             for(z=7;z>-1;z--)
           {
               q=QueueAuthenticPixels(image,pix,piy,1,1,exception);
+              if (q == (Quantum *) NULL)
+                break;
 
               if(binar[z])
             {