diff options
author | Christophe Fergeau <teuf@gnome.org> | 2005-11-15 14:41:10 +0000 |
---|---|---|
committer | Christophe Fergeau <teuf@gnome.org> | 2005-11-15 14:41:10 +0000 |
commit | 01139a53649d0f1d0e9781b9fdfca19c7a1027e2 (patch) | |
tree | 760b52724cc53de47c121661f7a172cdf1870455 | |
parent | 4836d309b560a8d2b47f27a5f6267836908e1f6c (diff) | |
download | libgpod-01139a53649d0f1d0e9781b9fdfca19c7a1027e2.tar.gz libgpod-01139a53649d0f1d0e9781b9fdfca19c7a1027e2.tar.xz libgpod-01139a53649d0f1d0e9781b9fdfca19c7a1027e2.zip |
2005-11-15 Christophe Fergeau <teuf@gnome.org>
* 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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/itdb_itunesdb.c | 6 |
2 files changed, 10 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2005-11-15 Christophe Fergeau <teuf@gnome.org> + + * src/itdb_itunesdb.c: (itdb_new): initialise glib type system before + calling ipod_device_new (which creates a gobject) + 2005-11-12 Jorg Schuler <jcsjcs at users.sourceforge.net> * 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 ()); |