# HG changeset patch # User Daniel Atallah # Date 1195238630 0 # Node ID 4d1a61e30199b809d5ca173cfea65c178cfeea64 # Parent 172fe34cc2d90995d9b9c01dadb15e9e8c883ad7 There appears to be a new GTK+ bug that causes the clipboard_clear callback to be triggered *after* the clipboard_copy callback on the second copy attempt. This makes stuff still work correctly when this happens (and, most importantly, not crash). I'll report this upstream. diff -r 172fe34cc2d9 -r 4d1a61e30199 pidgin/gtkimhtml.c --- a/pidgin/gtkimhtml.c Fri Nov 16 17:38:53 2007 +0000 +++ b/pidgin/gtkimhtml.c Fri Nov 16 18:43:50 2007 +0000 @@ -899,6 +899,9 @@ if (primary) { GtkTextMark *sel = NULL, *ins = NULL; + + g_return_if_fail(imhtml != NULL); + ins = gtk_text_buffer_get_insert(imhtml->text_buffer); sel = gtk_text_buffer_get_selection_bound(imhtml->text_buffer); gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &start, sel); @@ -957,7 +960,9 @@ static void gtk_imhtml_clipboard_clear (GtkClipboard *clipboard, GtkSelectionData *sel_data, guint info, gpointer user_data_or_owner) { +#ifndef _WIN32 clipboard_selection = NULL; +#endif } static void copy_clipboard_cb(GtkIMHtml *imhtml, gpointer unused)