more init check to libvips base class

helps introspection run correctly if there's no vips_init()
This commit is contained in:
John Cupitt 2022-02-27 18:48:37 +00:00
parent f11b58ff6c
commit 9d841e848f
2 changed files with 4 additions and 4 deletions

View File

@ -1066,10 +1066,6 @@ vips_image_class_init( VipsImageClass *class )
VIPS_DEBUG_MSG( "vips_image_class_init:\n" );
/* We must have threads set up before we can process.
*/
vips_check_init();
gobject_class->finalize = vips_image_finalize;
gobject_class->dispose = vips_image_dispose;
gobject_class->set_property = vips_object_set_property;

View File

@ -1562,6 +1562,10 @@ vips_object_class_init( VipsObjectClass *class )
{
GObjectClass *gobject_class = G_OBJECT_CLASS( class );
/* We must have threads set up before we can process.
*/
vips_check_init();
if( !vips__object_all ) {
vips__object_all = g_hash_table_new(
g_direct_hash, g_direct_equal );