summaryrefslogtreecommitdiff
path: root/widget/gtk/nsClipboard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'widget/gtk/nsClipboard.cpp')
-rw-r--r--widget/gtk/nsClipboard.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/widget/gtk/nsClipboard.cpp b/widget/gtk/nsClipboard.cpp
index 053ae970e8..eecae3e888 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