glx: make sure the context is really destroyed
GLX context is released when it's no longer current in any threads, so we have to release the context before destroy it. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
c2938ad4d9
commit
def63f9a56
|
@ -198,6 +198,7 @@ void glx_deinit(backend_t *base) {
|
||||||
|
|
||||||
// Destroy GLX context
|
// Destroy GLX context
|
||||||
if (gd->ctx) {
|
if (gd->ctx) {
|
||||||
|
glXMakeCurrent(gd->display, None, NULL);
|
||||||
glXDestroyContext(gd->display, gd->ctx);
|
glXDestroyContext(gd->display, gd->ctx);
|
||||||
gd->ctx = 0;
|
gd->ctx = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue