From abcb60b9ea356f7c3e9365a9e5332f988ad95ba9 Mon Sep 17 00:00:00 2001 From: Arnaud Fontaine Date: Sat, 22 Mar 2008 15:16:51 +0000 Subject: [PATCH] Fix x_get_transient_for_hint() based on XGetTransientForHint() --- common/xutil.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/xutil.c b/common/xutil.c index 7d145fa7e..cfb4c1599 100644 --- a/common/xutil.c +++ b/common/xutil.c @@ -129,8 +129,14 @@ x_get_transient_for_hint(xcb_connection_t *c, xcb_window_t win, WINDOW, 0, 1), NULL); - if(!r) + if(!r || r->type != WINDOW || r->format != 32 || r->length == 0) + { + *prop_win = XCB_NONE; + if(r) + p_delete(&r); + return false; + } *prop_win = *((xcb_window_t *) xcb_get_property_value(r)); p_delete(&r);