aboutsummaryrefslogtreecommitdiff
path: root/monsterwm.c
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2012-06-30 19:44:21 +0300
committerIvan Kanakarakis <ivan.kanak@gmail.com>2012-07-10 04:26:12 +0300
commit89cbe7ed5f863c206f9c877fa484dbdb45040aad (patch)
tree5de1bf07442b6f4439cb37d23513a7afe24de82e /monsterwm.c
parent175a668370d3b0231bc80e8809567cee3767db11 (diff)
rework propertynotify function - add parenthesis and check XWMHints pointer before free
Diffstat (limited to 'monsterwm.c')
-rw-r--r--monsterwm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/monsterwm.c b/monsterwm.c
index 9d4391d..a913392 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -687,8 +687,8 @@ void propertynotify(XEvent *e) {
Client *c = wintoclient(e->xproperty.window);
if (!c || e->xproperty.atom != XA_WM_HINTS) return;
XWMHints *wmh = XGetWMHints(dis, c->win);
- c->isurgent = c != curr && wmh && (wmh->flags & XUrgencyHint);
- XFree(wmh);
+ c->isurgent = (c != curr && wmh && (wmh->flags & XUrgencyHint));
+ if (wmh) XFree(wmh);
desktopinfo();
}