Skip to content

Commit

Permalink
http://www.imagemagick.org/discourse-server/viewtopic.php?f=2&t=28946
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Jan 7, 2016
1 parent 41c617e commit 4e81ce8
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions magick/cache.c
Expand Up @@ -3371,19 +3371,6 @@ static MagickBooleanType MaskPixelCacheNexus(Image *image,NexusInfo *nexus_info,
%
*/

static inline void AllocatePixelCachePixels(CacheInfo *cache_info)
{
cache_info->mapped=MagickFalse;
cache_info->pixels=(PixelPacket *) MagickAssumeAligned(
AcquireAlignedMemory(1,(size_t) cache_info->length));
if (cache_info->pixels == (PixelPacket *) NULL)
{
cache_info->mapped=MagickTrue;
cache_info->pixels=(PixelPacket *) MapBlob(-1,IOMode,0,(size_t)
cache_info->length);
}
}

#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
Expand Down Expand Up @@ -3603,7 +3590,9 @@ static MagickBooleanType OpenPixelCache(Image *image,const MapMode mode,
if (((cache_info->type == UndefinedCache) && (status != MagickFalse)) ||
(cache_info->type == MemoryCache))
{
AllocatePixelCachePixels(cache_info);
cache_info->mapped=MagickFalse;
cache_info->pixels=(PixelPacket *) MagickAssumeAligned(
AcquireAlignedMemory(1,(size_t) cache_info->length));
if (cache_info->pixels == (PixelPacket *) NULL)
cache_info->pixels=source_info.pixels;
else
Expand Down

0 comments on commit 4e81ce8

Please sign in to comment.