[evolution] Bug #595501 - Crash on a changed filter rule removal
- From: Milan Crha <mcrha src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution] Bug #595501 - Crash on a changed filter rule removal
- Date: Wed, 23 Sep 2009 11:54:50 +0000 (UTC)
commit 033337a389f993d5c8e46f482e829d97794ffb13
Author: Milan Crha <mcrha redhat com>
Date: Wed Sep 23 13:03:18 2009 +0200
Bug #595501 - Crash on a changed filter rule removal
filter/filter-rule.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/filter/filter-rule.c b/filter/filter-rule.c
index 7d28881..8c4d2bb 100644
--- a/filter/filter-rule.c
+++ b/filter/filter-rule.c
@@ -715,12 +715,17 @@ less_parts (GtkWidget *button, struct _rule_data *data)
{
FilterPart *part;
GtkWidget *rule;
+ struct _part_data *part_data;
if (g_list_length (data->fr->parts) < 1)
return;
rule = g_object_get_data ((GObject *) button, "rule");
- part = g_object_get_data ((GObject *) rule, "part");
+ part_data = g_object_get_data ((GObject *) rule, "data");
+
+ g_return_if_fail (part_data != NULL);
+
+ part = part_data->part;
/* remove the part from the list */
filter_rule_remove_part (data->fr, part);
@@ -741,7 +746,6 @@ attach_rule (GtkWidget *rule, struct _rule_data *data, FilterPart *part, gint ro
remove = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
g_object_set_data ((GObject *) remove, "rule", rule);
- g_object_set_data ((GObject *) rule, "part", part);
/*gtk_button_set_relief (GTK_BUTTON (remove), GTK_RELIEF_NONE);*/
g_signal_connect (remove, "clicked", G_CALLBACK (less_parts), data);
gtk_table_attach (GTK_TABLE (data->parts), remove, 1, 2, row, row + 1,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]