fix a sylpheed crash

This commit is contained in:
Matthias Clasen 2006-09-08 20:02:45 +00:00
parent d69649333b
commit 67a6f37ef6
2 changed files with 7 additions and 15 deletions

View File

@ -1,5 +1,9 @@
2006-09-08 Matthias Clasen <mclasen@redhat.com>
* 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 <richard@imendio.com>

View File

@ -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;
}