X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=x.c;h=12bc86b81cb03c663381965eddb664b3015884e6;hb=a5a928bfc1dd049780a45e072cb4ee42de7219bf;hp=d0b26acf1b3be29aafaf82d3a888aacb4e35e6f9;hpb=0b507bb73138c636fd0ad6f2321624aae1346d58;p=st.git diff --git a/x.c b/x.c index d0b26ac..12bc86b 100644 --- a/x.c +++ b/x.c @@ -245,8 +245,8 @@ clipcopy(const Arg *dummy) { Atom clipboard; - if (xsel.clipboard != NULL) - free(xsel.clipboard); + free(xsel.clipboard); + xsel.clipboard = NULL; if (xsel.primary != NULL) { xsel.clipboard = xstrdup(xsel.primary);