diff options
author | Brian Paul <brianp@vmware.com> | 2009-10-22 18:38:19 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-10-22 18:38:19 -0600 |
commit | ab9d1011f5549502a4b960c2067cde69856a2719 (patch) | |
tree | 21e45f55898d31001aa9cbc5ec5469974c94c75a /src/glx/x11/glxcmds.c | |
parent | 347fb3737be03488827d25610bec59cfb05bcab0 (diff) | |
parent | 55058652b886b95bfc24109a9edb04d274c01c1a (diff) |
Merge branch 'mesa_7_6_branch'
Diffstat (limited to 'src/glx/x11/glxcmds.c')
-rw-r--r-- | src/glx/x11/glxcmds.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c index cd4aede74e..c63116bab7 100644 --- a/src/glx/x11/glxcmds.c +++ b/src/glx/x11/glxcmds.c @@ -540,6 +540,16 @@ DestroyContext(Display * dpy, GLXContext gc) imported = gc->imported; gc->xid = None; + if (gc->currentDpy) { + /* This context is bound to some thread. According to the man page, + * we should not actually delete the context until it's unbound. + * Note that we set gc->xid = None above. In MakeContextCurrent() + * we check for that and delete the context there. + */ + __glXUnlock(); + return; + } + #ifdef GLX_DIRECT_RENDERING /* Destroy the direct rendering context */ if (gc->driContext) { |