Ensure we always call init_globals
authorColin Walters <walters@src.gnome.org>
Mon, 17 Nov 2008 00:49:58 +0000 (00:49 +0000)
committerColin Walters <walters@src.gnome.org>
Mon, 17 Nov 2008 00:49:58 +0000 (00:49 +0000)
svn path=/trunk/; revision=938

ChangeLog
girepository/girepository.c

index 953fb68..314fe27 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-16  Colin Walters  <walters@verbum.org>
+
+       * girepository/girepository.c: Ensure we always call init_globals,
+       even if passed a non-default repository.
+
 2008-11-16  Colin Walters  <walters@verbum.org>
 
        Bug 559706 - Interface prerequisites
index 8947f23..e8a2647 100644 (file)
@@ -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 *