1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-11 13:51:02 -05:00

Bug #1360: Fix a segfault by checking the return value of XQueryTree.

(Johan Kiviniemi)
This commit is contained in:
Adam Jackson 2004-09-14 19:01:16 +00:00
parent 36005e53a5
commit 7abdf973ea
2 changed files with 13 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2004-09-14 Adam Jackson <ajax@freedesktop.org>
* xcompmgr.c:
Bug #1360: Fix a segfault by checking the return value of XQueryTree.
(Johan Kiviniemi)
2004-09-10 Adam Jackson <ajax@freedesktop.org>
* xcompmgr.c:

View file

@ -1297,7 +1297,13 @@ determine_wintype (Display *dpy, Window w)
if (type != winNormalAtom)
return type;
XQueryTree (dpy, w, &root_return, &parent_return, &children, &nchildren);
if (!XQueryTree (dpy, w, &root_return, &parent_return, &children,
&nchildren))
{
/* XQueryTree failed. */
return winNormalAtom;
}
for (i = 0;i < nchildren;i++)
{
type = determine_wintype (dpy, children[i]);