check null pointer in broken tiled file handling
@@ -817,10 +817,13 @@ TiledInputFile::TiledInputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int
if (!_data->memoryMapped)
{
for (size_t i = 0; i < _data->tileBuffers.size(); i++)
+ {
+ if( _data->tileBuffers[i])
{
delete [] _data->tileBuffers[i]->buffer;
}
}
+ }
if (streamDataCreated) delete _data->_streamData;
delete _data;
throw;
@@ -859,10 +862,13 @@ TiledInputFile::TiledInputFile (const Header &header,
if (!_data->memoryMapped)
{
for (size_t i = 0; i < _data->tileBuffers.size(); i++)
+ {
+ if(_data->tileBuffers[i])
{
delete [] _data->tileBuffers[i]->buffer;
}
}
+ }
delete _data->_streamData;
delete _data;
throw;
