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 9c99a5879..e48a90da6 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,6 +129,7 @@ static int glxBlockClients;
static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
{
__GLXcontext *c;
+ __GLXcontext *cnext;
/* If this drawable was created using glx 1.3 drawable
* constructors, we added it as a glx drawable resource under both
@@ -137,7 +142,8 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE);
}
- for (c = glxAllContexts; c; c = c->next) {
+ for (c = glxAllContexts; c; c = cnext) {
+ cnext=c->next; /* Save because c is going to be freed */
if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
int i;