[empathy] Fix a warning if the handle doesn't exist



commit 530daa415e81ca3eadfbcc726486e3fdf80f6c1f
Author: Pierre-Luc Beaudoin <pierre-luc pierlux com>
Date:   Tue Apr 7 17:51:23 2009 -0400

    Fix a warning if the handle doesn't exist
---
 src/empathy-map-view.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/empathy-map-view.c b/src/empathy-map-view.c
index dd9f00f..108e9d9 100644
--- a/src/empathy-map-view.c
+++ b/src/empathy-map-view.c
@@ -166,8 +166,9 @@ map_view_contacts_foreach_disconnect (GtkTreeModel *model,
     return FALSE;
 
   handle_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (contact), "map-view-handle"));
+  if (handle_id > 0)
+    g_signal_handler_disconnect (contact, handle_id);
 
-  g_signal_handler_disconnect (contact, handle_id);
   return FALSE;
 }
 
@@ -180,6 +181,7 @@ map_view_destroy_cb (GtkWidget *widget,
   /* Set up contact list. */
   model = GTK_TREE_MODEL (window->list_store);
   gtk_tree_model_foreach (model, map_view_contacts_foreach_disconnect, window);
+  g_object_unref (window->list_store);
   g_free (window);
 }
 



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