aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxext.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glx/glxext.c')
-rw-r--r--xorg-server/glx/glxext.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xorg-server/glx/glxext.c b/xorg-server/glx/glxext.c
index 42fcf5914..c8885fd3a 100644
--- a/xorg-server/glx/glxext.c
+++ b/xorg-server/glx/glxext.c
@@ -129,8 +129,10 @@ static int glxBlockClients;
static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
{
__GLXcontext *c;
+ __GLXcontext *cnext;
- for (c = glxAllContexts; c; c = c->next) {
+ for (c = glxAllContexts; c; c = cnext) {
+ cnext=c->next; /* Safe because c is going to be freed */
if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
int i;