summaryrefslogtreecommitdiff
path: root/coders/palm.c
diff options
context:
space:
mode:
Diffstat (limited to 'coders/palm.c')
-rw-r--r--coders/palm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/coders/palm.c b/coders/palm.c
index c7aa8b0ea..cc5d42a9d 100644
--- a/coders/palm.c
+++ b/coders/palm.c
@@ -582,8 +582,8 @@ static Image *ReadPALMImage(const ImageInfo *image_info,
AcquireNextImage(image_info,image,exception);
if (GetNextImageInList(image) == (Image *) NULL)
{
- (void) DestroyImageList(image);
- return((Image *) NULL);
+ status=MagickFalse;
+ break;
}
image=SyncNextImageInList(image);
status=SetImageProgress(image,LoadImagesTag,TellBlob(image),
@@ -593,6 +593,8 @@ static Image *ReadPALMImage(const ImageInfo *image_info,
}
} while (nextDepthOffset != 0);
(void) CloseBlob(image);
+ if (status == MagickFalse)
+ return(DestroyImageList(image));
return(GetFirstImageInList(image));
}