From: Cristy Date: Sat, 20 Jan 2018 23:41:57 +0000 (-0500) Subject: ... X-Git-Tag: 7.0.7-22~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ecf23cb774d008cf5c60773e0cf380bf2576b955;p=imagemagick ... --- diff --git a/coders/mat.c b/coders/mat.c index 47b9fe61b..1fe03e5d8 100644 --- a/coders/mat.c +++ b/coders/mat.c @@ -777,18 +777,18 @@ static Image *ReadMATImageV4(const ImageInfo *image_info,Image *image, } if (quantum_info != (QuantumInfo *) NULL) quantum_info=DestroyQuantumInfo(quantum_info); - rotate_image=RotateImage(image,90.0,exception); - if (rotate_image != (Image *) NULL) - { - image=DestroyImage(image); - image=rotate_image; - } if (EOFBlob(image) != MagickFalse) { ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile", image->filename); break; } + rotate_image=RotateImage(image,90.0,exception); + if (rotate_image != (Image *) NULL) + { + image=DestroyImage(image); + image=rotate_image; + } /* Proceed to next image. */