[brasero/gnome-2-28] Fix a crash on closing brasero that happened because some signals were emitted whereas we were destr



commit 2bfcba1f647746b6b94f40dfac4fb8b21641e537
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Fri Oct 23 11:35:36 2009 +0200

    Fix a crash on closing brasero that happened because some signals were emitted whereas we were destroying widgets

 src/brasero-search-beagle.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/brasero-search-beagle.c b/src/brasero-search-beagle.c
index 28d5ffb..a5c1fb2 100644
--- a/src/brasero-search-beagle.c
+++ b/src/brasero-search-beagle.c
@@ -366,7 +366,7 @@ brasero_search_init (BraseroSearch *obj)
 
 	gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (obj->priv->tree), TRUE);
 	g_signal_connect (G_OBJECT (obj->priv->tree), 
-			  "row_activated",
+			  "row-activated",
 			  G_CALLBACK (brasero_search_tree_activated_cb),
 			  obj);
 	g_signal_connect (G_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (obj->priv->tree))),
@@ -518,12 +518,17 @@ brasero_search_destroy (GtkObject *object)
 	}
 
 	if (search->priv->tree) {
-		brasero_search_empty_tree (search);
-		search->priv->tree = NULL;
+		g_signal_handlers_disconnect_by_func (gtk_tree_view_get_selection (GTK_TREE_VIEW (search->priv->tree)),
+		                                      brasero_search_tree_selection_changed_cb,
+		                                      search);
+
 		g_signal_handlers_disconnect_by_func (search->priv->filter,
 						      brasero_search_mime_filter_changed,
 						      search);
-		search->priv->filter = 0;
+
+		brasero_search_empty_tree (search);
+		search->priv->filter = NULL;
+		search->priv->tree = NULL;
 	}
 
 	if (search->priv->id) {



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