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