[Telepathy-commits] [telepathy-haze/master] HazeIMChannel: unref the channel's handle on dispose

Simon McVittie "http://smcv.pseudorandom.co.uk/" at dhansak.collabora.co.uk
Thu Oct 16 03:31:47 PDT 2008


---
 src/im-channel.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/im-channel.c b/src/im-channel.c
index 0d5f43e..518f807 100644
--- a/src/im-channel.c
+++ b/src/im-channel.c
@@ -458,11 +458,17 @@ haze_im_channel_dispose (GObject *obj)
 {
     HazeIMChannel *chan = HAZE_IM_CHANNEL (obj);
     HazeIMChannelPrivate *priv = HAZE_IM_CHANNEL_GET_PRIVATE (chan);
+    TpBaseConnection *conn = (TpBaseConnection *) priv->conn;
+    TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (conn,
+        TP_HANDLE_TYPE_CONTACT);
 
     if (priv->dispose_has_run)
         return;
     priv->dispose_has_run = TRUE;
 
+    if (priv->handle != 0)
+        tp_handle_unref (contact_handles, priv->handle);
+
     if (!priv->closed)
     {
         purple_conversation_destroy (priv->conv);
-- 
1.5.6.5




More information about the Telepathy-commits mailing list