summaryrefslogtreecommitdiff
path: root/clients/terminal.c
diff options
context:
space:
mode:
Diffstat (limited to 'clients/terminal.c')
-rw-r--r--clients/terminal.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/clients/terminal.c b/clients/terminal.c
index 274ced09..16a44954 100644
--- a/clients/terminal.c
+++ b/clients/terminal.c
@@ -2264,6 +2264,9 @@ terminal_copy(struct terminal *terminal, struct input *input)
{
terminal->selection =
display_create_data_source(terminal->display);
+ if (!terminal->selection)
+ return;
+
wl_data_source_offer(terminal->selection,
"text/plain;charset=utf-8");
wl_data_source_add_listener(terminal->selection,