allow default NULL basename in vips_type_find()

oops, got dropped in earlier commit, thanks Lovell
This commit is contained in:
John Cupitt 2014-05-12 20:15:50 +01:00
parent 22d525d54f
commit 7303261a31

View File

@ -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 ||