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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/xorg-server/glx/glxext.c b/xorg-server/glx/glxext.c
index 751ea7297..a3b5b62dd 100644
--- a/xorg-server/glx/glxext.c
+++ b/xorg-server/glx/glxext.c
@@ -30,6 +30,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include <string.h>
@@ -125,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;