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.
This commit is contained in:
parent
60a1d2c276
commit
b608c864cc
|
@ -3534,7 +3534,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])
|
||||
|
|
Loading…
Reference in New Issue
Block a user