From e6cf04484d3b5301e4a542906409d48262cf3d66 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 17 Nov 2008 00:49:58 +0000 Subject: [PATCH] Ensure we always call init_globals svn path=/trunk/; revision=938 --- girepository.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/girepository.c b/girepository.c index 8947f2344..e8a26474a 100644 --- a/girepository.c +++ b/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 *