mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 13:28:08 +02:00
glx: If a destroyed window is bound to the current context, make it not current.
Avoids subsequent crashes due to stale pointers to the DrawableRec, see
https://bugs.freedesktop.org/show_bug.cgi?id=21132#c15 and previous comments.
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
(cherry picked from commit 2075d4bf9e)
This commit is contained in:
parent
a32d717ac6
commit
fad2de1cca
1 changed files with 4 additions and 0 deletions
|
|
@ -127,6 +127,10 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
|
|||
__GLXcontext *c;
|
||||
|
||||
for (c = glxAllContexts; c; c = c->next) {
|
||||
if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
|
||||
(*c->loseCurrent)(c);
|
||||
__glXFlushContextCache();
|
||||
}
|
||||
if (c->drawPriv == glxPriv)
|
||||
c->drawPriv = NULL;
|
||||
if (c->readPriv == glxPriv)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue