diff options
Diffstat (limited to 'widgets/table/e-table-subset.c')
-rw-r--r-- | widgets/table/e-table-subset.c | 27 |
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; |