# HG changeset patch # User Daniel Atallah # Date 1195238630 0 # Node ID cba1683eeafcd355afdf9e0f8c19a3402ee0f43c # Parent 4e98fb3661ccdb66e83a0435bb60828c09c6d2df 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 4e98fb3661cc -r cba1683eeafc 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)