fix a crash with empty image arrays in bandjoin

see https://github.com/libvips/pyvips/pull/310
This commit is contained in:
John Cupitt 2022-03-24 22:38:03 +00:00
parent 62fee01f3a
commit a77a1071a2

View File

@ -271,8 +271,15 @@ vips_bandary_init( VipsBandary *bandary )
int
vips_bandary_copy( VipsBandary *bandary )
{
VipsObjectClass *object_class = VIPS_OBJECT_GET_CLASS( bandary );
VipsConversion *conversion = VIPS_CONVERSION( bandary );
if( !bandary->in ) {
vips_error( object_class->nickname,
"%s", _( "no input images" ) );
return( -1 );
}
/* This isn't set by arith until build(), so we have to set
* again here.
*