* image.c (imagemagick_get_animation_cache): Don't segfault when
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 18 Aug 2013 19:18:43 +0000 (21:18 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 18 Aug 2013 19:18:43 +0000 (21:18 +0200)
pruning all entries.

src/ChangeLog
src/image.c

index 671f6af..7ee4169 100644 (file)
@@ -1,3 +1,8 @@
+2013-08-18  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * image.c (imagemagick_get_animation_cache): Don't segfault when
+       pruning all entries.
+
 2013-08-18  Ken Brown  <kbrown@cornell.edu>
 
        * sheap.c (STATIC_HEAP_SIZE): Adjust to current needs; use bigger
index 198d554..1452e86 100644 (file)
@@ -7932,9 +7932,10 @@ struct animation_cache *
 imagemagick_get_animation_cache (MagickWand *wand)
 {
   char *signature = xstrdup (MagickGetImageSignature (wand));
-  struct animation_cache *cache = animation_cache;
+  struct animation_cache *cache;
 
   imagemagick_prune_animation_cache ();
+  cache = animation_cache;
 
   if (! cache)
     {