diff options
author | Colin Walters <walters@src.gnome.org> | 2008-11-17 00:49:58 +0000 |
---|---|---|
committer | Colin Walters <walters@src.gnome.org> | 2008-11-17 00:49:58 +0000 |
commit | 8ac2535d5e8f887dafdcfb6943144f347e1fec23 (patch) | |
tree | b0c9785e2f021ae74674273fa64bf94e1c4b8ed3 /girepository/girepository.c | |
parent | e5a28d0a9830b888365f5e9c9bd243d1213e4f91 (diff) | |
download | gobject-introspection-8ac2535d5e8f887dafdcfb6943144f347e1fec23.tar.gz |
Ensure we always call init_globals
svn path=/trunk/; revision=938
Diffstat (limited to 'girepository/girepository.c')
-rw-r--r-- | girepository/girepository.c | 11 |
1 files changed, 5 insertions, 6 deletions
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 * |