selection: we already have a direct pointer to the clipboard struct

This commit is contained in:
Daniel Eklöf 2019-11-22 21:51:53 +01:00
parent 34eac2dbe3
commit da92abef31
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -530,7 +530,7 @@ text_to_clipboard(struct terminal *term, char *text, uint32_t serial)
{
struct wl_clipboard *clipboard = &term->wl->clipboard;
if (term->wl->clipboard.data_source != NULL) {
if (clipboard->data_source != NULL) {
/* Kill previous data source */
assert(clipboard->serial != 0);
wl_data_device_set_selection(term->wl->data_device, NULL, clipboard->serial);