diff --git a/coders/tiff.c b/coders/tiff.c index 10ca0a67eb..a95f78bf1c 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -4079,13 +4079,15 @@ RestoreMSCWarning if (image->colorspace == LabColorspace) DecodeLabImage(image,&image->exception); DestroyTIFFInfo(&tiff_info); - if (image->exception.severity > ErrorException) - break; DisableMSCWarning(4127) if (0 && (image_info->verbose != MagickFalse)) RestoreMSCWarning TIFFPrintDirectory(tiff,stdout,MagickFalse); - (void) TIFFWriteDirectory(tiff); + if (TIFFWriteDirectory(tiff) == 0) + { + status=MagickFalse; + break; + } image=SyncNextImageInList(image); if (image == (Image *) NULL) break; @@ -4094,6 +4096,6 @@ RestoreMSCWarning break; } while (image_info->adjoin != MagickFalse); TIFFClose(tiff); - return(image->exception.severity > ErrorException ? MagickFalse : MagickTrue); + return(status); } #endif