From 7303261a3149d46cd5367486b442cf5cd0811b2f Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Mon, 12 May 2014 20:15:50 +0100 Subject: [PATCH] allow default NULL basename in vips_type_find() oops, got dropped in earlier commit, thanks Lovell --- libvips/iofuncs/object.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libvips/iofuncs/object.c b/libvips/iofuncs/object.c index fb8b8fa4..232e16f2 100644 --- a/libvips/iofuncs/object.c +++ b/libvips/iofuncs/object.c @@ -2548,6 +2548,8 @@ vips_type_find( const char *basename, const char *nickname ) { static GOnce once = G_ONCE_INIT; + const char *classname = basename ? basename : "VipsObject"; + GType base; GType type; @@ -2560,7 +2562,7 @@ vips_type_find( const char *basename, const char *nickname ) /* We must only search below basename ... check that the cache hit is * in the right part of the tree. */ - if( !(base = g_type_from_name( basename )) ) + if( !(base = g_type_from_name( classname )) ) return( 0 ); if( !type || type == -1 ||