summaryrefslogtreecommitdiffstats
path: root/src/glx/dri2_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/dri2_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/dri2_glx.c')
-rw-r--r--src/glx/dri2_glx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 4a08f84de3c..a94223b2a12 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -119,7 +119,8 @@ dri2_destroy_context(__GLXcontext *context)
struct dri2_context *pcp = (struct dri2_context *) context;
struct dri2_screen *psc = (struct dri2_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);