summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2011-12-03 11:04:34 +0800
committerChia-I Wu <[email protected]>2011-12-03 11:10:16 +0800
commitb7a69cbb71304609245be43fa739c50969017ab8 (patch)
tree0c604aa77cc61522b28cd5aa1f66fa325dd982bc /src/egl/drivers
parentaa010157a3f4fa1be7b85d476538bd5496e91004 (diff)
egl_glx: fix eglDestroyContext
Wrong pointers are passed to glXDestroyContext. Spotted by Brian Paul.
Diffstat (limited to 'src/egl/drivers')
-rw-r--r--src/egl/drivers/glx/egl_glx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/egl/drivers/glx/egl_glx.c b/src/egl/drivers/glx/egl_glx.c
index bdc8a28b4f2..e07ce90a9a8 100644
--- a/src/egl/drivers/glx/egl_glx.c
+++ b/src/egl/drivers/glx/egl_glx.c
@@ -720,11 +720,12 @@ static EGLBoolean
GLX_eglDestroyContext(_EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx)
{
struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
+ struct GLX_egl_display *GLX_dpy = GLX_egl_display(disp);
struct GLX_egl_context *GLX_ctx = GLX_egl_context(ctx);
if (_eglPutContext(ctx)) {
assert(GLX_ctx);
- GLX_drv->glXDestroyContext(disp, ctx);
+ GLX_drv->glXDestroyContext(GLX_dpy->dpy, GLX_ctx->context);
free(GLX_ctx);
}