[evolution] Bug #680682 - Segfault after label attempted deletion



commit 9e73b4012a0919c2fb5d1a1f270c7a670eacc28d
Author: Milan Crha <mcrha redhat com>
Date:   Fri Jul 27 09:26:51 2012 +0200

    Bug #680682 - Segfault after label attempted deletion

 mail/e-mail-label-list-store.c |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/mail/e-mail-label-list-store.c b/mail/e-mail-label-list-store.c
index bf64216..9491d70 100644
--- a/mail/e-mail-label-list-store.c
+++ b/mail/e-mail-label-list-store.c
@@ -205,17 +205,13 @@ mail_label_list_store_finalize (GObject *object)
 }
 
 static void
-labels_model_changed_cb (GtkTreeModel *model,
-                         GtkTreePath *path,
-                         GtkTreeIter *iter,
-                         gpointer user_data)
+labels_model_changed_cb (EMailLabelListStore *store)
 {
-	EMailLabelListStore *store;
 	GPtrArray *array;
 	GtkTreeIter tmp_iter;
 	gboolean iter_set;
 
-	store = E_MAIL_LABEL_LIST_STORE (user_data);
+	g_return_if_fail (E_IS_MAIL_LABEL_LIST_STORE (store));
 
 	/* Make sure we don't enter an infinite synchronizing loop */
 	g_signal_handlers_block_by_func (
@@ -303,16 +299,16 @@ mail_label_list_store_constructed (GObject *object)
 		store->priv->mail_settings, "labels", store);
 
 	/* Connect to ListStore change notifications */
-	g_signal_connect (
+	g_signal_connect_swapped (
 		store, "row-inserted",
 		G_CALLBACK (labels_model_changed_cb), store);
-	g_signal_connect (
+	g_signal_connect_swapped (
 		store, "row-changed",
 		G_CALLBACK (labels_model_changed_cb), store);
-	g_signal_connect (
+	g_signal_connect_swapped (
 		store, "row-deleted",
 		G_CALLBACK (labels_model_changed_cb), store);
-	g_signal_connect (
+	g_signal_connect_swapped (
 		store, "rows-reordered",
 		G_CALLBACK (labels_model_changed_cb), store);
 



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