[telepathy-mission-control/master] mcd_dispatch_operation_set_property: don't steal ownership of the channels GList
Simon McVittie
simon.mcvittie at collabora.co.uk
Tue Oct 20 12:18:08 PDT 2009
---
src/mcd-dispatch-operation.c | 3 ++-
src/mcd-dispatcher.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index 4b5d9c3..e8ad4f2 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -718,7 +718,8 @@ mcd_dispatch_operation_set_property (GObject *obj, guint prop_id,
case PROP_CHANNELS:
g_assert (priv->channels == NULL);
- priv->channels = g_value_get_pointer (val);
+ priv->channels = g_list_copy (g_value_get_pointer (val));
+
if (G_LIKELY (priv->channels))
{
/* get the connection and account from the first channel */
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index 3c988cd..170a3f0 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -583,7 +583,8 @@ _mcd_dispatcher_enter_state_machine (McdDispatcher *dispatcher,
context->operation = _mcd_dispatch_operation_new (priv->clients,
priv->handler_map, !requested, channels,
(const gchar * const *) possible_handlers);
- /* ownership of @channels is stolen, but the GObject references are not */
+
+ g_list_free (channels);
if (!requested)
{
--
1.5.6.5
More information about the telepathy-commits
mailing list