From: Cristy Date: Sun, 26 Nov 2017 14:54:00 +0000 (-0500) Subject: https://github.com/ImageMagick/ImageMagick/issues/876 X-Git-Tag: 7.0.7-12~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=76ee4f4175ce896f84178dc1b181c933ee5aa3a1;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/876 --- diff --git a/MagickCore/cache.c b/MagickCore/cache.c index 615bdc93d..28fc33406 100644 --- a/MagickCore/cache.c +++ b/MagickCore/cache.c @@ -3432,6 +3432,7 @@ static MagickBooleanType OpenPixelCache(Image *image,const MapMode mode, message[MagickPathExtent]; const char + *hosts, *type; MagickBooleanType @@ -3578,7 +3579,9 @@ static MagickBooleanType OpenPixelCache(Image *image,const MapMode mode, } } } - if (cache_info->type == DistributedCache) + status=AcquireMagickResource(DiskResource,cache_info->length); + hosts=GetImageRegistry(StringRegistryType,"cache:hosts",exception); + if ((status == MagickFalse) && (hosts != (const char *) NULL)) { DistributeCacheInfo *server_info; @@ -3643,7 +3646,6 @@ static MagickBooleanType OpenPixelCache(Image *image,const MapMode mode, /* Create pixel cache on disk. */ - status=AcquireMagickResource(DiskResource,cache_info->length); if (status == MagickFalse) { cache_info->type=UndefinedCache;