From 08359ab14b5ac19de9032906cf488340ec721a1b Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 9 Feb 2017 18:10:43 -0500 Subject: [PATCH] =?utf8?q?Check=20for=20image=20list=20before=20we=20destr?= =?utf8?q?oy=20the=20last=20image=20in=20XCF=20coder=20(patch=20sent=20pri?= =?utf8?q?vately=20by=20=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=A7?= =?utf8?q?=D0=B5=D1=80=D0=BD=D1=8B=D0=B9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- coders/xcf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)); -- 2.40.0