Skip to content

Commit

Permalink
opengl: release context in glx_destroy
Browse files Browse the repository at this point in the history
GLX context is not destroyed immediately after calling
glXDestroyContext. It is only destroyed when it's no longer
being used. So make sure to release the context

Fixes yshui#381

Signed-off-by: Yuxuan Shui <[email protected]>
  • Loading branch information
yshui committed Apr 20, 2020
1 parent 17831a7 commit 701eb0a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/opengl.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ void glx_destroy(session_t *ps) {

// Destroy GLX context
if (ps->psglx->context) {
glXMakeCurrent(ps->dpy, None, NULL);
glXDestroyContext(ps->dpy, ps->psglx->context);
ps->psglx->context = NULL;
}
Expand Down

0 comments on commit 701eb0a

Please sign in to comment.