diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-12-22 23:37:15 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-12-26 02:06:47 +0800 |
commit | 9ee5a2d0ec80e655cb834f8f95603f572c2f87f9 (patch) | |
tree | 80e65a5cf50bbc73deafb350d10d263262c1d57e | |
parent | 50f96722448f152b8bfe0c24501c4b1eb0136359 (diff) | |
download | gsoc2013-empathy-9ee5a2d0ec80e655cb834f8f95603f572c2f87f9.tar gsoc2013-empathy-9ee5a2d0ec80e655cb834f8f95603f572c2f87f9.tar.gz gsoc2013-empathy-9ee5a2d0ec80e655cb834f8f95603f572c2f87f9.tar.bz2 gsoc2013-empathy-9ee5a2d0ec80e655cb834f8f95603f572c2f87f9.tar.lz gsoc2013-empathy-9ee5a2d0ec80e655cb834f8f95603f572c2f87f9.tar.xz gsoc2013-empathy-9ee5a2d0ec80e655cb834f8f95603f572c2f87f9.tar.zst gsoc2013-empathy-9ee5a2d0ec80e655cb834f8f95603f572c2f87f9.zip |
account-widget: ensure that the object stays alive during the tp_account_manager_prepare_async call
-rw-r--r-- | libempathy-gtk/empathy-account-widget.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index 216a36571..4747c8c9e 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -1343,7 +1343,7 @@ account_manager_ready_cb (GObject *source_object, { DEBUG ("Failed to prepare account manager: %s", error->message); g_error_free (error); - return; + goto out; } state = tp_account_manager_get_most_available_presence (account_manager, NULL, @@ -1352,6 +1352,9 @@ account_manager_ready_cb (GObject *source_object, /* simulate a presence change so the apply button will be changed * if needed */ presence_changed_cb (account_manager, state, NULL, NULL, self); + +out: + g_object_unref (self); } #define WIDGET(cm, proto) \ @@ -1556,6 +1559,7 @@ do_constructed (GObject *obj) /* dup and init the account-manager */ priv->account_manager = tp_account_manager_dup (); + g_object_ref (self); tp_account_manager_prepare_async (priv->account_manager, NULL, account_manager_ready_cb, self); |