Ensure we always call init_globals

svn path=/trunk/; revision=938
This commit is contained in:
Colin Walters 2008-11-17 00:49:58 +00:00
parent b87284dac2
commit e6cf04484d

View File

@ -82,7 +82,7 @@ g_irepository_class_init (GIRepositoryClass *class)
} }
static void static void
init_globals () init_globals (void)
{ {
g_static_mutex_lock (&globals_lock); g_static_mutex_lock (&globals_lock);
@ -179,13 +179,12 @@ get_typelib_dependencies (GTypelib *typelib)
static GIRepository * static GIRepository *
get_repository (GIRepository *repository) get_repository (GIRepository *repository)
{ {
init_globals ();
if (repository != NULL) if (repository != NULL)
return repository; return repository;
else else
{ return default_repository;
init_globals ();
return default_repository;
}
} }
static GTypelib * static GTypelib *