]> granicus.if.org Git - imagemagick/commitdiff
Fixed incorrect blob referencing.
authorDirk Lemstra <dirk@git.imagemagick.org>
Sun, 11 Mar 2018 09:41:12 +0000 (10:41 +0100)
committerDirk Lemstra <dirk@git.imagemagick.org>
Sun, 11 Mar 2018 09:41:12 +0000 (10:41 +0100)
coders/mat.c

index 7a8f1e5bc9a64a7a4f716fdfdd87d4af64ade4f1..f75300cd10cd3dd030949850d810ed8229cadb10 100644 (file)
@@ -787,15 +787,11 @@ static Image *ReadMATImageV4(const ImageInfo *image_info,Image *image,
     rotated_image=RotateImage(image,90.0,exception);
     if (rotated_image != (Image *) NULL)
       {
-        void
-          *blob;
-        
         rotated_image->page.x=0;
         rotated_image->page.y=0;
-        blob = rotated_image->blob;
-        rotated_image->blob = image->blob;
         rotated_image->colors = image->colors;
-        image->blob = (BlobInfo *) blob;
+        DestroyBlob(rotated_image);
+        rotated_image->blob=ReferenceBlob(image->blob);
         AppendImageToList(&image,rotated_image);
         DeleteImageFromList(&image);
       }