summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dwm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dwm.c b/dwm.c
index 4f345ee..8f4fa75 100644
--- a/dwm.c
+++ b/dwm.c
@@ -870,7 +870,8 @@ getatomprop(Client *c, Atom prop)
if (XGetWindowProperty(dpy, c->win, prop, 0L, sizeof atom, False, XA_ATOM,
&da, &di, &dl, &dl, &p) == Success && p) {
- atom = *(Atom *)p;
+ if (dl > 0)
+ atom = *(Atom *)p;
XFree(p);
}
return atom;