[empathy] dispatcher_channel_invalidated_cb: always remove invalidated chan from the list



commit c17ffb62ebc6e69071e0a0380b2402ba8201bb83
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Tue Jul 6 11:23:46 2010 +0200

    dispatcher_channel_invalidated_cb: always remove invalidated chan from the list
    
    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 |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c
index ad9a236..778d3be 100644
--- a/libempathy/empathy-dispatcher.c
+++ b/libempathy/empathy-dispatcher.c
@@ -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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]