From 8e9811c71b25733728b53a20642adaeb1a9c9d3d Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Wed, 6 Jun 2018 19:29:03 -0400 Subject: backport mozbug #546387: fix assert failure in gtk which prints to the console. --- widget/gtk/nsClipboard.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widget/gtk/nsClipboard.cpp b/widget/gtk/nsClipboard.cpp index 053ae970e..eecae3e88 100644 --- a/widget/gtk/nsClipboard.cpp +++ b/widget/gtk/nsClipboard.cpp @@ -214,7 +214,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 -- cgit v1.2.3