]> git.0d.be Git - empathy.git/commitdiff
dispatcher_channel_invalidated_cb: always remove invalidated chan from the list
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 6 Jul 2010 09:23:46 +0000 (11:23 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 6 Jul 2010 09:27:09 +0000 (11:27 +0200)
It doesn't hurt to always try to remove it and prevent us of keeping an
invalidated or disposed object around if something weird happens.

libempathy/empathy-dispatcher.c

index ad9a236c24c6e7d7c8aab0be4662a4d50cb10247..778d3be62c460ff662de31568b51e93808a212fd 100644 (file)
@@ -414,6 +414,8 @@ dispatcher_channel_invalidated_cb (TpProxy *proxy,
 
   connection = tp_channel_borrow_connection (TP_CHANNEL (proxy));
 
+  priv->channels = g_list_remove (priv->channels, proxy);
+
   cd = g_hash_table_lookup (priv->connections, connection);
   /* Connection itself invalidated? */
   if (cd == NULL)
@@ -425,8 +427,6 @@ dispatcher_channel_invalidated_cb (TpProxy *proxy,
 
   g_hash_table_remove (cd->dispatched_channels, object_path);
   g_hash_table_remove (cd->dispatching_channels, object_path);
-
-  priv->channels = g_list_remove (priv->channels, proxy);
 }
 
 static void