]> granicus.if.org Git - imagemagick/commitdiff
Added missing allocation of the next image.
authorDirk Lemstra <dirk@lemstra.org>
Sun, 14 Jul 2019 15:14:32 +0000 (17:14 +0200)
committerDirk Lemstra <dirk@lemstra.org>
Sun, 14 Jul 2019 15:14:32 +0000 (17:14 +0200)
coders/tim2.c

index b19f5343b2cb233f807489cc37503960769d0007..8908882849059783a1ed390565e655b168b7a37f 100644 (file)
@@ -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)