diff options
Diffstat (limited to 'MagickWand/wand-view.c')
-rw-r--r-- | MagickWand/wand-view.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/MagickWand/wand-view.c b/MagickWand/wand-view.c index c567425f2..37a5c30c2 100644 --- a/MagickWand/wand-view.c +++ b/MagickWand/wand-view.c @@ -127,10 +127,7 @@ WandExport WandView *CloneWandView(const WandView *wand_view) assert(wand_view->signature == MagickWandSignature); if (wand_view->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand_view->name); - clone_view=(WandView *) AcquireMagickMemory(sizeof(*clone_view)); - if (clone_view == (WandView *) NULL) - ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed", - wand_view->name); + clone_view=(WandView *) AcquireCriticalMemory(sizeof(*clone_view)); (void) memset(clone_view,0,sizeof(*clone_view)); clone_view->id=AcquireWandId(); (void) FormatLocaleString(clone_view->name,MagickPathExtent,"%s-%.20g", @@ -752,10 +749,7 @@ WandExport WandView *NewWandView(MagickWand *wand) assert(wand != (MagickWand *) NULL); assert(wand->signature == MagickWandSignature); - wand_view=(WandView *) AcquireMagickMemory(sizeof(*wand_view)); - if (wand_view == (WandView *) NULL) - ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed", - GetExceptionMessage(errno)); + wand_view=(WandView *) AcquireCriticalMemory(sizeof(*wand_view)); (void) memset(wand_view,0,sizeof(*wand_view)); wand_view->id=AcquireWandId(); (void) FormatLocaleString(wand_view->name,MagickPathExtent,"%s-%.20g", @@ -814,10 +808,7 @@ WandExport WandView *NewWandViewExtent(MagickWand *wand,const ssize_t x, assert(wand != (MagickWand *) NULL); assert(wand->signature == MagickWandSignature); - wand_view=(WandView *) AcquireMagickMemory(sizeof(*wand_view)); - if (wand_view == (WandView *) NULL) - ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed", - GetExceptionMessage(errno)); + wand_view=(WandView *) AcquireCriticalMemory(sizeof(*wand_view)); (void) memset(wand_view,0,sizeof(*wand_view)); wand_view->id=AcquireWandId(); (void) FormatLocaleString(wand_view->name,MagickPathExtent,"%s-%.20g", |