diff options
author | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2009-08-05 17:43:29 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2009-08-25 20:16:20 -0700 |
commit | 0f613007cd43545eda40825bd74ada3e6e5f36f6 (patch) | |
tree | b0ce035e339dab76a97f3642a0e5de1414390f45 /dix/window.c | |
parent | e7dd1efef408effe52d0bd3d3aa0b5d4ee10ed90 (diff) |
CheckWindowOptionalNeed: Ensure w->optional is set to avoid SEGFAULT
If CheckWindowOptionalNeed is called consecutively (and the first removes optional), then
we will SEGFAULT. This can happen in XQuartz because ReparentWindow will call
pScreen->ReparentWindow which can DeleteProperty which will CheckWindowOptionalNeed... then
ReparentWindow will call it again later indiscriminantly.
(cherry picked from commit b608c864ccc59628bd33c033393121b61580460e)
Diffstat (limited to 'dix/window.c')
-rw-r--r-- | dix/window.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dix/window.c b/dix/window.c index 1a645f61f..9663578f7 100644 --- a/dix/window.c +++ b/dix/window.c @@ -3386,7 +3386,7 @@ CheckWindowOptionalNeed (WindowPtr w) WindowOptPtr optional; WindowOptPtr parentOptional; - if (!w->parent) + if (!w->parent || !w->optional) return; optional = w->optional; if (optional->dontPropagateMask != DontPropagateMasks[w->dontPropagate]) |