From 67a6f37ef6c1bb20c637b2a4fdb0bd8dff555489 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 8 Sep 2006 20:02:45 +0000 Subject: [PATCH] fix a sylpheed crash --- ChangeLog | 4 ++++ gtk/gtktextbuffer.c | 18 +++--------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6bf656c043..12f042d867 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-09-08 Matthias Clasen + * gtk/gtktextbuffer.c (remove_all_selection_clipboards): + Don't clear clipboards here, since we are called from finalize + and can't emit signals. + * configure.in: Set version to 2.11.0 2006-09-06 Richard Hult diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c index 3de0d79208..e933fc0e61 100644 --- a/gtk/gtktextbuffer.c +++ b/gtk/gtktextbuffer.c @@ -567,10 +567,10 @@ gtk_text_buffer_finalize (GObject *object) buffer = GTK_TEXT_BUFFER (object); - remove_all_selection_clipboards (buffer); - priv = GTK_TEXT_BUFFER_GET_PRIVATE (buffer); + remove_all_selection_clipboards (buffer); + if (buffer->tag_table) { _gtk_text_tag_table_remove_buffer (buffer->tag_table, buffer); @@ -3509,19 +3509,7 @@ gtk_text_buffer_remove_selection_clipboard (GtkTextBuffer *buffer, static void remove_all_selection_clipboards (GtkTextBuffer *buffer) { - GSList *tmp_list = buffer->selection_clipboards; - while (tmp_list) - { - SelectionClipboard *selection_clipboard = tmp_list->data; - - if (gtk_clipboard_get_owner (selection_clipboard->clipboard) == G_OBJECT (buffer)) - gtk_clipboard_clear (selection_clipboard->clipboard); - - g_free (selection_clipboard); - - tmp_list = tmp_list->next; - } - + g_slist_foreach (buffer->selection_clipboards, (GFunc)g_free, NULL); g_slist_free (buffer->selection_clipboards); buffer->selection_clipboards = NULL; }