mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-04-21 07:40:51 +02:00
glx: fix open-coded linked list removal function
OMG stab stab stab, YALL. removal function was made of crack, actually truncated the list from the one after the find point. However fixing this makes glean makecurrent fail with a GLX error.
This commit is contained in:
parent
3ea747c0db
commit
918923e285
1 changed files with 11 additions and 5 deletions
16
glx/glxext.c
16
glx/glxext.c
|
|
@ -150,12 +150,18 @@ void __glXAddToContextList(__GLXcontext *cx)
|
|||
|
||||
void __glXRemoveFromContextList(__GLXcontext *cx)
|
||||
{
|
||||
__GLXcontext *c, **prev;
|
||||
__GLXcontext *c, *prev;
|
||||
|
||||
prev = &glxAllContexts;
|
||||
for (c = glxAllContexts; c; c = c->next)
|
||||
if (c == cx)
|
||||
*prev = c->next;
|
||||
if (cx == glxAllContexts)
|
||||
glxAllContexts = cx->next;
|
||||
else {
|
||||
prev = glxAllContexts;
|
||||
for (c = glxAllContexts; c; c = c->next) {
|
||||
if (c == cx)
|
||||
prev->next = c->next;
|
||||
prev = c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue