summaryrefslogtreecommitdiff
path: root/clients/editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'clients/editor.c')
-rw-r--r--clients/editor.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/clients/editor.c b/clients/editor.c
index 78d10d2c..8f9eb632 100644
--- a/clients/editor.c
+++ b/clients/editor.c
@@ -639,6 +639,9 @@ editor_copy_cut(struct editor *editor, struct input *input, bool cut)
editor->selection =
display_create_data_source(editor->display);
+ if (!editor->selection)
+ return;
+
wl_data_source_offer(editor->selection,
"text/plain;charset=utf-8");
wl_data_source_add_listener(editor->selection,