summaryrefslogtreecommitdiffstats
path: root/src/glx/drisw_glx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/drisw_glx.c')
-rw-r--r--src/glx/drisw_glx.c3
1 files changed, 2 insertions, 1 deletions
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);