Commit c57d3922 authored by Chris H-C's avatar Chris H-C
Browse files

bug 546387 - Don't try to set the GTK clipboard with null items r=karlt

It causes an assert failure in gtk which prints to the console.

MozReview-Commit-ID: A4106Z4rT36

--HG--
extra : rebase_source : 642c94a95cfa3939bc475e9139ee63caa78e3005
parent dfa9a07b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -246,7 +246,8 @@ nsClipboard::SetData(nsITransferable *aTransferable,
    GtkTargetEntry *gtkTargets = gtk_target_table_new_from_list(list, &numTargets);
          
    // Set getcallback and request to store data after an application exit
    if (gtk_clipboard_set_with_data(gtkClipboard, gtkTargets, numTargets, 
    if (gtkTargets &&
        gtk_clipboard_set_with_data(gtkClipboard, gtkTargets, numTargets,
                                    clipboard_get_cb, clipboard_clear_cb, this))
    {
        // We managed to set-up the clipboard so update internal state