[Telepathy-commits] [telepathy-salut/master] GibberIqHelper: Allow the user callback to unref the GibberIqHelper
Alban Crequy
alban.crequy at collabora.co.uk
Thu Feb 26 11:20:11 PST 2009
---
lib/gibber/gibber-iq-helper.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/lib/gibber/gibber-iq-helper.c b/lib/gibber/gibber-iq-helper.c
index 0a96ac5..64136fe 100644
--- a/lib/gibber/gibber-iq-helper.c
+++ b/lib/gibber/gibber-iq-helper.c
@@ -121,10 +121,16 @@ xmpp_connection_received_stanza_cb (GibberXmppConnection *conn,
!= 0)
return;
+ /* the user callback may want to free the GibberIqHelper object. Delay this.
+ */
+ g_object_ref (self);
+
data->reply_func (self, data->sent_stanza,
stanza, data->object, data->user_data);
g_hash_table_remove (priv->id_handlers, id);
+
+ g_object_unref (self);
}
static GObject *
--
1.5.6.5
More information about the telepathy-commits
mailing list