mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
set TIFFSetErrorHandler to null to start to avoid tiff from printing to stderr on fail - refs #1783
This commit is contained in:
parent
72a453efc0
commit
a8e2ef7cc7
@ -117,11 +117,13 @@ void tiff_reader::on_error(const char* /*module*/, const char* fmt, va_list argp
|
||||
|
||||
void tiff_reader::init()
|
||||
{
|
||||
// TODO: error handling
|
||||
TIFFSetWarningHandler(0);
|
||||
// Note - we intentially set the error handling to null
|
||||
// when opening the image for the first time to avoid
|
||||
// leaking in TiffOpen: https://github.com/mapnik/mapnik/issues/1783
|
||||
TIFFSetErrorHandler(0);
|
||||
TIFF* tif = load_if_exists(file_name_);
|
||||
if (!tif) throw image_reader_exception( std::string("Can't load tiff file: '") + file_name_ + "'");
|
||||
|
||||
TIFFSetWarningHandler(0);
|
||||
TIFFSetErrorHandler(on_error);
|
||||
|
||||
char msg[1024];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user