summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2013-10-02 17:38:05 -0400
committerAdam Jackson <ajax@redhat.com>2013-10-29 10:30:43 -0400
commit7f5adf73a0f9a951a6df201532b4031d38054369 (patch)
treeb8022d8bf4afb596e632b884a011a542b1da37c0
parent53653f4889dcaea0cf67f8a4180af71eeb4b2f6b (diff)
glx: Simplify glXDestroyContext
We can just free the resource unconditionally here. ContextGone (which FreeResourceByType will call) already does: cx->idExists = GL_FALSE; if (!cx->currentClient) { __glXFreeContext(cx); } Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--glx/glxcmds.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index f7ca8267e..0fc73628b 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -406,9 +406,7 @@ __glXDisp_DestroyContext(__GLXclientState * cl, GLbyte * pc)
&glxc, &err))
return err;
- glxc->idExists = GL_FALSE;
- if (!glxc->currentClient)
- FreeResourceByType(req->context, __glXContextRes, FALSE);
+ FreeResourceByType(req->context, __glXContextRes, FALSE);
return Success;
}