aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-09-17 18:05:22 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-09-17 18:05:22 +0000
commitfcb2beebdaf7882a7f9e7af9c040a7e0a3a68391 (patch)
tree8e903d2c99ce3c6f06f6ae42ab1956aa6c573d9e
parentselection: primary unset: don’t free text twice (diff)
selection: reset clipboard/primary->text after free:ing it
-rw-r--r--selection.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/selection.c b/selection.c
index 78811af3..6cfacc02 100644
--- a/selection.c
+++ b/selection.c
@@ -1010,6 +1010,7 @@ text_to_clipboard(struct seat *seat, struct terminal *term, char *text, uint32_t
clipboard->data_source = NULL;
clipboard->serial = 0;
+ clipboard->text = NULL;
}
clipboard->data_source
@@ -1294,6 +1295,7 @@ text_to_primary(struct seat *seat, struct terminal *term, char *text, uint32_t s
primary->data_source = NULL;
primary->serial = 0;
+ primary->text = NULL;
}
primary->data_source