don't crash on invalid tiff
This commit is contained in:
parent
7a1310b819
commit
024da67802
|
|
@ -513,7 +513,9 @@ Reader(PNMFileType *type, istream *file, bool owns_file, string magic_number) :
|
|||
////////////////////////////////////////////////////////////////////
|
||||
PNMFileTypeTIFF::Reader::
|
||||
~Reader() {
|
||||
TIFFClose( tif );
|
||||
if (tif != (struct tiff *)NULL) {
|
||||
TIFFClose(tif);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
Loading…
Reference in New Issue