]> git.imager.perl.org - imager.git/blobdiff - gif.c
put the prototypes line in the right place
[imager.git] / gif.c
diff --git a/gif.c b/gif.c
index e300831d2197ee958b439a89752a41b537f74f84..3aa46d46f44c360c8ec609baebb15ba907541fef 100644 (file)
--- a/gif.c
+++ b/gif.c
@@ -416,9 +416,12 @@ Internal function called by i_readgif_multi_low() in error handling
 */
 static void free_images(i_img **imgs, int count) {
   int i;
-  for (i = 0; i < count; ++i)
-    i_img_destroy(imgs[i]);
-  myfree(imgs);
+  
+  if (count) {
+    for (i = 0; i < count; ++i)
+      i_img_destroy(imgs[i]);
+    myfree(imgs);
+  }
 }
 
 /*