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)
This commit is contained in:
parent
e7dd1efef4
commit
0f613007cd
|
@ -3386,7 +3386,7 @@ CheckWindowOptionalNeed (WindowPtr w)
|
||||||
WindowOptPtr optional;
|
WindowOptPtr optional;
|
||||||
WindowOptPtr parentOptional;
|
WindowOptPtr parentOptional;
|
||||||
|
|
||||||
if (!w->parent)
|
if (!w->parent || !w->optional)
|
||||||
return;
|
return;
|
||||||
optional = w->optional;
|
optional = w->optional;
|
||||||
if (optional->dontPropagateMask != DontPropagateMasks[w->dontPropagate])
|
if (optional->dontPropagateMask != DontPropagateMasks[w->dontPropagate])
|
||||||
|
|
Loading…
Reference in New Issue