assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
- assert(image->blob != (BlobInfo *) NULL);
blob_info=image->blob;
- if (blob_info->type == UndefinedStream)
+ if ((blob_info == (BlobInfo *) NULL) || (blob_info->type == UndefinedStream))
return(MagickTrue);
status=SyncBlob(image);
switch (blob_info->type)
MATLAB_HDR.StructureClass != mxINT64_CLASS &&
MATLAB_HDR.StructureClass != mxUINT64_CLASS) /* uint64 + uint64 3D */
{
- if (image2 != (Image*) NULL)
+ if ((image2 != (Image*) NULL) && (image2 != image))
{
CloseBlob(image2);
DeleteImageFromList(&image2);