]> git.armaanb.net Git - st.git/blobdiff - x.c
fix regression by selecting clipboard text
[st.git] / x.c
diff --git a/x.c b/x.c
index 12bc86b81cb03c663381965eddb664b3015884e6..c343ba2bdaf446aba578a55cb219afb73cf00fda 100644 (file)
--- 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;