connection-watcher: disconnect 'invalidated' signals on accounts when disposing
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Sun, 2 May 2010 18:15:09 +0000 (20:15 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Sun, 2 May 2010 18:19:20 +0000 (20:19 +0200)
src/connection-watcher.c

index 60afc5a..04f4b87 100644 (file)
@@ -71,6 +71,12 @@ connection_watcher_init (ConnectionWatcher *obj)
 static void connection_watcher_dispose (GObject *object);
 static void connection_watcher_finalize (GObject *object);
 
+static void account_invalidated_cb (TpProxy *proxy,
+    guint domain,
+    gint code,
+    gchar *message,
+    gpointer user_data);
+
 static void
 connection_watcher_class_init (ConnectionWatcherClass *connection_watcher_class)
 {
@@ -105,6 +111,8 @@ connection_watcher_dispose (GObject *object)
 
   for (l = priv->accounts; l != NULL; l = g_list_next (l))
     {
+      g_signal_handlers_disconnect_by_func (l->data, account_invalidated_cb,
+          self);
       g_object_unref (l->data);
     }