Mercurial > audlegacy
diff src/audacious/main.c @ 2644:67082557b2c4 trunk
[svn] - glib-2.13.0 requires g_thread_init() to be called before all other GLib functions.
author | yaz |
---|---|
date | Sat, 24 Mar 2007 23:25:20 -0700 |
parents | 1ceaf00f9c6d |
children | 4d5e6a8717dd |
line wrap: on
line diff
--- a/src/audacious/main.c Fri Mar 23 10:51:02 2007 -0700 +++ b/src/audacious/main.c Sat Mar 24 23:25:20 2007 -0700 @@ -1035,6 +1035,18 @@ GOptionContext *context; GError *error = NULL; + /* glib-2.13.0 requires g_thread_init() to be called before all + other GLib functions */ + g_thread_init(NULL); + if (!g_thread_supported()) { + g_printerr(_("Sorry, threads isn't supported on your platform.\n\n" + "If you're on a libc5 based linux system and installed Glib & GTK+ before you\n" + "installed LinuxThreads you need to recompile Glib & GTK+.\n")); + exit(EXIT_FAILURE); + } + + gdk_threads_init(); + /* Setup l10n early so we can print localized error messages */ gtk_set_locale(); bindtextdomain(PACKAGE_NAME, LOCALEDIR); @@ -1058,16 +1070,6 @@ g_set_application_name(_(application_name)); - g_thread_init(NULL); - if (!g_thread_supported()) { - g_printerr(_("Sorry, threads isn't supported on your platform.\n\n" - "If you're on a libc5 based linux system and installed Glib & GTK+ before you\n" - "installed LinuxThreads you need to recompile Glib & GTK+.\n")); - exit(EXIT_FAILURE); - } - - gdk_threads_init(); - cond_scan = g_cond_new(); mutex_scan = g_mutex_new();