aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-subset.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2001-01-19 00:42:33 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2001-01-19 00:42:33 +0800
commit12347daf568506538abf8f63c54c2699e8e8d383 (patch)
treec62f74503724529b0480a04830489b9372b49d18 /widgets/table/e-table-subset.c
parent00fadf4666521ac784f922d8fe72254f4f5688c0 (diff)
downloadgsoc2013-evolution-12347daf568506538abf8f63c54c2699e8e8d383.tar.gz
gsoc2013-evolution-12347daf568506538abf8f63c54c2699e8e8d383.tar.zst
gsoc2013-evolution-12347daf568506538abf8f63c54c2699e8e8d383.zip
Disconnect from the etss->source's signals *before* we unref it.
2001-01-18 Federico Mena Quintero <federico@ximian.com> * e-table-subset.c (etss_destroy): Disconnect from the etss->source's signals *before* we unref it. * e-table-group-container.c (e_table_group_apply_to_leafs): Ref() and unref() around the callback to protect ourselves from being unrefed in the middle of iterating through the nodes. svn path=/trunk/; revision=7621
Diffstat (limited to 'widgets/table/e-table-subset.c')
-rw-r--r--widgets/table/e-table-subset.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/widgets/table/e-table-subset.c b/widgets/table/e-table-subset.c
index 0eee187271..88ec8e59f4 100644
--- a/widgets/table/e-table-subset.c
+++ b/widgets/table/e-table-subset.c
@@ -23,17 +23,24 @@ etss_destroy (GtkObject *object)
{
ETableSubset *etss = E_TABLE_SUBSET (object);
- if (etss->source)
- gtk_object_unref (GTK_OBJECT (etss->source));
+ if (etss->source) {
+ gtk_signal_disconnect (GTK_OBJECT (etss->source),
+ etss->table_model_pre_change_id);
+ gtk_signal_disconnect (GTK_OBJECT (etss->source),
+ etss->table_model_changed_id);
+ gtk_signal_disconnect (GTK_OBJECT (etss->source),
+ etss->table_model_row_changed_id);
+ gtk_signal_disconnect (GTK_OBJECT (etss->source),
+ etss->table_model_cell_changed_id);
+
+ etss->table_model_pre_change_id = 0;
+ etss->table_model_changed_id = 0;
+ etss->table_model_row_changed_id = 0;
+ etss->table_model_cell_changed_id = 0;
- gtk_signal_disconnect (GTK_OBJECT (etss->source),
- etss->table_model_pre_change_id);
- gtk_signal_disconnect (GTK_OBJECT (etss->source),
- etss->table_model_changed_id);
- gtk_signal_disconnect (GTK_OBJECT (etss->source),
- etss->table_model_row_changed_id);
- gtk_signal_disconnect (GTK_OBJECT (etss->source),
- etss->table_model_cell_changed_id);
+ gtk_object_unref (GTK_OBJECT (etss->source));
+ etss->source = NULL;
+ }
etss->table_model_pre_change_id = 0;
etss->table_model_changed_id = 0;