From: Cristy Date: Thu, 9 Feb 2017 23:10:43 +0000 (-0500) Subject: Check for image list before we destroy the last image in XCF coder (patch sent privat... X-Git-Tag: 7.0.4-8~29 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=08359ab14b5ac19de9032906cf488340ec721a1b;p=imagemagick Check for image list before we destroy the last image in XCF coder (patch sent privately by Андрей Черный) --- diff --git a/coders/xcf.c b/coders/xcf.c index 8098cd82f..abac48e25 100644 --- a/coders/xcf.c +++ b/coders/xcf.c @@ -1422,7 +1422,8 @@ static Image *ReadXCFImage(const ImageInfo *image_info,ExceptionInfo *exception) } (void) CloseBlob(image); - DestroyImage(RemoveFirstImageFromList(&image)); + if (GetNextImageInList(image) != (Image *) NULL) + DestroyImage(RemoveFirstImageFromList(&image)); if (image_type == GIMP_GRAY) image->type=GrayscaleType; return(GetFirstImageInList(image));