From 8ac2535d5e8f887dafdcfb6943144f347e1fec23 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 17 Nov 2008 00:49:58 +0000 Subject: Ensure we always call init_globals svn path=/trunk/; revision=938 --- girepository/girepository.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'girepository/girepository.c') diff --git a/girepository/girepository.c b/girepository/girepository.c index 8947f234..e8a26474 100644 --- a/girepository/girepository.c +++ b/girepository/girepository.c @@ -82,7 +82,7 @@ g_irepository_class_init (GIRepositoryClass *class) } static void -init_globals () +init_globals (void) { g_static_mutex_lock (&globals_lock); @@ -179,13 +179,12 @@ get_typelib_dependencies (GTypelib *typelib) static GIRepository * get_repository (GIRepository *repository) { + init_globals (); + if (repository != NULL) return repository; - else - { - init_globals (); - return default_repository; - } + else + return default_repository; } static GTypelib * -- cgit v1.2.1