Ensure expected signature in ExceptionInfo before destroy

GraphicsMagick asserts this in DestroyExceptionInfo

read_free is called multiple times since fc5a4a9
This commit is contained in:
Lovell Fuller 2015-04-15 20:05:19 +01:00
parent d8ea72895a
commit e4326fc9ad

View File

@ -143,7 +143,9 @@ read_free( Read *read )
VIPS_FREEF( DestroyImage, read->image );
VIPS_FREEF( DestroyImageInfo, read->image_info );
VIPS_FREE( read->frames );
DestroyExceptionInfo( &read->exception );
if ( (&read->exception)->signature == MagickSignature ) {
DestroyExceptionInfo( &read->exception );
}
VIPS_FREEF( vips_g_mutex_free, read->lock );
}