From: Sam Thursfield Date: Thu, 7 Jul 2011 10:42:45 +0000 (+0100) Subject: DBus: call g_type_init() as part of init X-Git-Tag: 0.7.1~199^2~17 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=moonshot-ui.git;a=commitdiff_plain;h=01d02dcd84fe48cc8ddc7616bb50e59837929e75 DBus: call g_type_init() as part of init --- diff --git a/libmoonshot/libmoonshot-dbus.c b/libmoonshot/libmoonshot-dbus.c index ca76000..b2a62d3 100644 --- a/libmoonshot/libmoonshot-dbus.c +++ b/libmoonshot/libmoonshot-dbus.c @@ -158,8 +158,13 @@ static DBusGProxy *get_dbus_proxy (MoonshotError **error) g_static_mutex_lock (&init_lock); - if (dbus_proxy == NULL) + if (dbus_proxy == NULL) { + /* Make sure GObject is initialised, in case we are the only user + * of GObject in the process + */ + g_type_init (); dbus_proxy = dbus_connect (error); + } if (dbus_proxy != NULL) g_object_ref (dbus_proxy);