summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurélien Aptel2012-01-10 22:21:03 +0100
committerAurélien Aptel2012-01-10 22:21:03 +0100
commit13a8eeb810ccfdaefd58c52328dd0ec867e3ae8d (patch)
tree8aa456c2e6062420123a2cf7c1cc05640b5e9b4b
parentab9c9a4e3af246d0b4c6419bffb02a23fd5c1462 (diff)
downloadst-13a8eeb810ccfdaefd58c52328dd0ec867e3ae8d.tar.gz
st-13a8eeb810ccfdaefd58c52328dd0ec867e3ae8d.tar.xz
st-13a8eeb810ccfdaefd58c52328dd0ec867e3ae8d.zip
fix segfault in selection. (thx Martti Kühne)
-rw-r--r--st.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/st.c b/st.c
index e193443..c3d0888 100644
--- a/st.c
+++ b/st.c
@@ -547,7 +547,7 @@ selrequest(XEvent *e) {
XA_ATOM, 32, PropModeReplace,
(unsigned char *) &string, 1);
xev.property = xsre->property;
- } else if(xsre->target == sel.xtarget) {
+ } else if(xsre->target == sel.xtarget && sel.clip != NULL) {
XChangeProperty(xsre->display, xsre->requestor, xsre->property,
xsre->target, 8, PropModeReplace,
(unsigned char *) sel.clip, strlen(sel.clip));