fix a refleak in the new vipsload
This commit is contained in:
parent
1650332906
commit
690091ba8b
@ -114,6 +114,7 @@ vips_foreign_load_vips_header( VipsForeignLoad *load )
|
|||||||
|
|
||||||
const char *filename;
|
const char *filename;
|
||||||
VipsImage *image;
|
VipsImage *image;
|
||||||
|
VipsImage *x;
|
||||||
|
|
||||||
if( (filename =
|
if( (filename =
|
||||||
vips_connection_filename( VIPS_CONNECTION( vips->source ) )) ) {
|
vips_connection_filename( VIPS_CONNECTION( vips->source ) )) ) {
|
||||||
@ -134,6 +135,13 @@ vips_foreign_load_vips_header( VipsForeignLoad *load )
|
|||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* What a hack. Remove the @out that's there now and replace it with
|
||||||
|
* our image.
|
||||||
|
*/
|
||||||
|
g_object_get( load, "out", &x, NULL );
|
||||||
|
g_object_unref( x );
|
||||||
|
g_object_unref( x );
|
||||||
|
|
||||||
g_object_set( load, "out", image, NULL );
|
g_object_set( load, "out", image, NULL );
|
||||||
|
|
||||||
return( 0 );
|
return( 0 );
|
||||||
|
Loading…
Reference in New Issue
Block a user