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:
Dave Airlie 2009-06-10 15:13:45 +10:00
parent 3ea747c0db
commit 918923e285

View File

@ -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;
}
}
}
/*