summaryrefslogtreecommitdiffstats
path: root/src/glx/dri_glx.c
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-07-23 22:05:21 -0400
committerKristian Høgsberg <[email protected]>2010-07-23 22:05:53 -0400
commitd77bb8e059ecfed9b714301fc31b093c6026c7bc (patch)
treebf201f09f5f253cb5adeea6e6df581bb9b89f251 /src/glx/dri_glx.c
parent6739d52fdced53a566188215d204ffef1e85a5e6 (diff)
glx: Don't destroy context with XID 0
We use XID 0 to indicate the context has already been destroyed, but it's currently bound.
Diffstat (limited to 'src/glx/dri_glx.c')
-rw-r--r--src/glx/dri_glx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c
index d0f680de636..eaf8e3b7f25 100644
--- a/src/glx/dri_glx.c
+++ b/src/glx/dri_glx.c
@@ -505,7 +505,8 @@ dri_destroy_context(__GLXcontext * context)
struct dri_context *pcp = (struct dri_context *) context;
struct dri_screen *psc = (struct dri_screen *) context->psc;
- glx_send_destroy_context(psc->base.dpy, context->xid);
+ if (context->xid)
+ glx_send_destroy_context(psc->base.dpy, context->xid);
if (context->extensions)
XFree((char *) context->extensions);