From 7ce7b7b5d4b2bc5e79bbb7d23fb2e6096ce97f56 Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Thu, 28 Jun 2012 19:51:31 +0300 Subject: rework unmapnotify function return condition --- monsterwm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'monsterwm.c') diff --git a/monsterwm.c b/monsterwm.c index 855ec99..22bf802 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -864,8 +864,9 @@ void tile(void) { /* windows that request to unmap should lose their * client, so no invisible windows exist on screen */ void unmapnotify(XEvent *e) { - Client *c = wintoclient(e->xunmap.window); - if (c && e->xunmap.send_event) { removeclient(c); desktopinfo(); } + Client *c = NULL; + if (!e->xunmap.send_event || !(c = wintoclient(e->xunmap.window))) return; + else { removeclient(c); desktopinfo(); } } /* find to which client the given window belongs to */ -- cgit v1.3.1