]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Mon, 6 May 2019 12:55:38 +0000 (08:55 -0400)
committerCristy <urban-warrior@imagemagick.org>
Mon, 6 May 2019 12:55:38 +0000 (08:55 -0400)
MagickCore/cache.c

index 7ed75727fe46dc196d40510b7b857708ad192f8e..e3400efbe4ea0b67d7d8eea04971094c5205ee97 100644 (file)
@@ -703,7 +703,7 @@ static MagickBooleanType ClonePixelCacheRepository(
     Mismatched pixel cache morphology.
   */
   cache_nexus=AcquirePixelCacheNexus(cache_info->number_threads);
-  clone_nexus=AcquirePixelCacheNexus(cache_info->number_threads);
+  clone_nexus=AcquirePixelCacheNexus(clone_info->number_threads);
   length=cache_info->number_channels*sizeof(*cache_info->channel_map);
   optimize=(cache_info->number_channels == clone_info->number_channels) &&
     (memcmp(cache_info->channel_map,clone_info->channel_map,length) == 0) ?
@@ -826,8 +826,8 @@ static MagickBooleanType ClonePixelCacheRepository(
         status=WritePixelCacheMetacontent(clone_info,clone_nexus[id],exception);
       }
     }
+  clone_nexus=DestroyPixelCacheNexus(clone_nexus,clone_info->number_threads);
   cache_nexus=DestroyPixelCacheNexus(cache_nexus,cache_info->number_threads);
-  clone_nexus=DestroyPixelCacheNexus(clone_nexus,cache_info->number_threads);
   if (cache_info->debug != MagickFalse)
     {
       char