mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00: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:
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user