[dumper] Fix threads initialization
authorColin Walters <walters@verbum.org>
Wed, 2 Dec 2009 17:56:52 +0000 (12:56 -0500)
committerColin Walters <walters@verbum.org>
Wed, 2 Dec 2009 17:59:40 +0000 (12:59 -0500)
Correctly guard with g_thread_supported, call g_thread_init before
g_type_init.

giscanner/dumper.py

index 0ca8272..b11768c 100644 (file)
@@ -46,8 +46,8 @@ main(int argc, char **argv)
   GOptionContext *context;
   GError *error = NULL;
 
+  if (!g_thread_supported ()) g_thread_init (NULL);
   g_type_init ();
-  g_thread_init (NULL);
 
   context = g_option_context_new ("");
   g_option_context_add_main_entries (context, entries, "girepository-1.0");