From 411840d4380e962981ee1ddecd527c04132f1cb4 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Sun, 14 Jul 2019 17:14:32 +0200 Subject: [PATCH] Added missing allocation of the next image. --- coders/tim2.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/coders/tim2.c b/coders/tim2.c index b19f5343b..890888284 100644 --- a/coders/tim2.c +++ b/coders/tim2.c @@ -757,6 +757,20 @@ static Image *ReadTIM2Image(const ImageInfo *image_info,ExceptionInfo *exception if (image_info->number_scenes != 0) if (image->scene >= (image_info->scene+image_info->number_scenes-1)) break; + /* + Allocate next image structure. + */ + AcquireNextImage(image_info,image,exception); + if (GetNextImageInList(image) == (Image *) NULL) + { + status=MagickFalse; + break; + } + image=SyncNextImageInList(image); + status=SetImageProgress(image,LoadImagesTag,image->scene-1, + image->scene); + if (status == MagickFalse) + break; } (void) CloseBlob(image); if (status == MagickFalse) -- 2.40.0