summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--glx/glxext.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/glx/glxext.c b/glx/glxext.c
index e41b881f2..c201fba86 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -469,6 +469,12 @@ __glXForceCurrent(__GLXclientState * cl, GLXContextTag tag, int *error)
/* Make this context the current one for the GL. */
if (!cx->isDirect) {
+ /*
+ * If it is being forced, it means that this context was already made
+ * current. So it cannot just be made current again without decrementing
+ * refcount's
+ */
+ (*cx->loseCurrent) (cx);
lastGLContext = cx;
if (!(*cx->makeCurrent) (cx)) {
/* Bind failed, and set the error code. Bummer */