[Telepathy-commits] [telepathy-glib/master] MessageMixin: hold a ref to the TpBaseConnection
Will Thompson
will.thompson at collabora.co.uk
Thu Dec 18 10:41:50 PST 2008
---
telepathy-glib/message-mixin.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/telepathy-glib/message-mixin.c b/telepathy-glib/message-mixin.c
index 1359cfa..8c970bd 100644
--- a/telepathy-glib/message-mixin.c
+++ b/telepathy-glib/message-mixin.c
@@ -1024,7 +1024,7 @@ tp_message_mixin_init (GObject *obj,
mixin->priv->recv_id = 0;
mixin->priv->msg_types = g_array_sized_new (FALSE, FALSE, sizeof (guint),
NUM_TP_CHANNEL_TEXT_MESSAGE_TYPES);
- mixin->priv->connection = connection;
+ mixin->priv->connection = g_object_ref (connection);
mixin->priv->supported_content_types = g_new0 (gchar *, 1);
}
@@ -1062,6 +1062,8 @@ tp_message_mixin_finalize (GObject *obj)
g_array_free (mixin->priv->msg_types, TRUE);
g_strfreev (mixin->priv->supported_content_types);
+ g_object_unref (mixin->priv->connection);
+
g_slice_free (TpMessageMixinPrivate, mixin->priv);
}
--
1.5.6.5
More information about the Telepathy-commits
mailing list