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
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…
Reference in New Issue
Block a user