aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--x.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/x.c b/x.c
index 12bc86b..c343ba2 100644
--- a/x.c
+++ b/x.c
@@ -618,6 +618,9 @@ selrequest(XEvent *e)
void
setsel(char *str, Time t)
{
+ if (!str)
+ return;
+
free(xsel.primary);
xsel.primary = str;