From d77bb8e059ecfed9b714301fc31b093c6026c7bc Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Fri, 23 Jul 2010 22:05:21 -0400 Subject: 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. --- src/glx/drisw_glx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/glx/drisw_glx.c') diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index 852e56e484e..11f88e96703 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -245,7 +245,8 @@ drisw_destroy_context(__GLXcontext *context) struct drisw_context *pcp = (struct drisw_context *) context; struct drisw_screen *psc = (struct drisw_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); -- cgit v1.2.3