if (delete_list == (MagickBooleanType *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","`%s'",(*images)->filename);
+ ResourceLimitError,"MemoryAllocationFailed","'%s'",(*images)->filename);
return;
}
image=(*images);
/*
Designed to efficiently find first image (index == 0), or last image
- (index == -1) as appropriate, without to go through the whole image list,
- unless the offset is outside of the list length range.
-
- That is it tries to avoid 'counting the whole list' to handle the index.
+ (index == -1) as appropriate, without to go through the whole image list.
+ That is it tries to avoid 'counting the whole list' to handle the
+ most common image indexes.
*/
if ( index < 0 )
{
if (group == (Image **) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","`%s'",images->filename);
+ ResourceLimitError,"MemoryAllocationFailed","'%s'",images->filename);
return((Image **) NULL);
}
images=GetFirstImageInList(images);
% o image: the image.
%
*/
-MagickExport void PrependImageToList(Image **images,Image *image)
+MagickExport void PrependImageToList(Image **images,Image *prepend)
{
- AppendImageToList(&image,*images);
+ if (*images == (Image *) NULL)
+ {
+ *images=prepend;
+ return;
+ }
+ AppendImageToList(&prepend,*images);
}
\f
/*