From 9a7528f5b99bd234f724aa229cbf75fb6a813282 Mon Sep 17 00:00:00 2001 From: okan Date: Mon, 11 Mar 2019 15:25:46 +0000 Subject: Check the atom type on propertynotify before iterating. --- xevents.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xevents.c b/xevents.c index c5a2aad..4dfef72 100644 --- a/xevents.c +++ b/xevents.c @@ -210,9 +210,11 @@ xev_handle_propertynotify(XEvent *ee) /* do nothing */ break; } - } else if ((sc = screen_find(e->window)) != NULL) { - if (e->atom == ewmh[_NET_DESKTOP_NAMES]) - xu_ewmh_net_desktop_names(sc); + } else { + if (e->atom == ewmh[_NET_DESKTOP_NAMES]) { + if ((sc = screen_find(e->window)) != NULL) + xu_ewmh_net_desktop_names(sc); + } } } -- cgit 1.4.1