aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-11-22 20:52:59 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-11-22 20:55:47 +0000
commitfc7069e1a6bb7f75b63eec699dd5cfb401b4f3b5 (patch)
tree21341346f226dca220bf7be8a0694dcd52401b0c /selection.c
parentselection: selection_to_clipboard: exit early on no-selection (diff)
selection: text_to_clipboard: assert the clipboard serial is not 0
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/selection.c b/selection.c
index 66d848c6..8ed0b6da 100644
--- a/selection.c
+++ b/selection.c
@@ -557,6 +557,7 @@ text_to_clipboard(struct terminal *term, char *text, uint32_t serial)
wl_data_device_set_selection(term->wl->data_device, clipboard->data_source, serial);
/* Needed when sending the selection to other client */
+ assert(serial != 0);
clipboard->serial = serial;
return true;
}