X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=x.c;h=c343ba2bdaf446aba578a55cb219afb73cf00fda;hb=f4020b2cc4fe45c9e8bfe47fc73deccd867cf9de;hp=12bc86b81cb03c663381965eddb664b3015884e6;hpb=5345db3c9be1a22ca19202035b881b951c2f0f9e;p=st.git 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;