aboutsummaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-09-23 19:03:18 +0800
committerMilan Crha <mcrha@redhat.com>2009-09-23 19:03:18 +0800
commit033337a389f993d5c8e46f482e829d97794ffb13 (patch)
tree3469eaec5c5ae4dba5049be82b7a65f429be68b8 /filter
parent5b771a75004ddbd6bfa29b50cdb7a0e188eafbb9 (diff)
downloadgsoc2013-evolution-033337a389f993d5c8e46f482e829d97794ffb13.tar.gz
gsoc2013-evolution-033337a389f993d5c8e46f482e829d97794ffb13.tar.zst
gsoc2013-evolution-033337a389f993d5c8e46f482e829d97794ffb13.zip
Bug #595501 - Crash on a changed filter rule removal
Diffstat (limited to 'filter')
-rw-r--r--filter/filter-rule.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/filter/filter-rule.c b/filter/filter-rule.c
index 7d28881fb4..8c4d2bbffd 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,