From 01139a53649d0f1d0e9781b9fdfca19c7a1027e2 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Tue, 15 Nov 2005 14:41:10 +0000 Subject: 2005-11-15 Christophe Fergeau * src/itdb_itunesdb.c: (itdb_new): initialise glib type system before calling ipod_device_new (which creates a gobject) git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1151 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- ChangeLog | 5 +++++ src/itdb_itunesdb.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2b7a889..8affc45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-15 Christophe Fergeau + + * src/itdb_itunesdb.c: (itdb_new): initialise glib type system before + calling ipod_device_new (which creates a gobject) + 2005-11-12 Jorg Schuler * src/itdb_itunesdb.c: when new rating is set on the iPod, backup diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c index fdbf8b1..eacbf77 100644 --- a/src/itdb_itunesdb.c +++ b/src/itdb_itunesdb.c @@ -902,7 +902,11 @@ guint32 itdb_tracks_number_nontransferred (Itdb_iTunesDB *itdb) values */ Itdb_iTunesDB *itdb_new (void) { - Itdb_iTunesDB *itdb = g_new0 (Itdb_iTunesDB, 1); + static GOnce g_type_init_once = G_ONCE_INIT; + Itdb_iTunesDB *itdb; + + g_once (&g_type_init_once, (GThreadFunc)g_type_init, NULL); + itdb = g_new0 (Itdb_iTunesDB, 1); itdb->version = 0x09; itdb->id = ((guint64)g_random_int () << 32) | ((guint64)g_random_int ()); -- cgit