From 300deba3be97e83c52c82e6294501b05b0dbfbb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 3 Jan 2012 22:53:33 -0500 Subject: [PATCH] x11: Handle non-existing properties correctly Don't try to read out ATOM or WINDOW values if there is no such property. --- src/xserver-launcher.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/xserver-launcher.c b/src/xserver-launcher.c index 486e7642..a032c791 100644 --- a/src/xserver-launcher.c +++ b/src/xserver-launcher.c @@ -624,6 +624,11 @@ weston_wm_handle_map_notify(struct weston_wm *wm, xcb_generic_event_t *event) if (!reply) /* Bad window, typically */ continue; + if (reply->type == XCB_ATOM_NONE) { + /* No such property */ + free(reply); + continue; + } p = ((char *) window + props[i].offset);