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>
This commit is contained in:
parent
53653f4889
commit
7f5adf73a0
|
|
@ -406,8 +406,6 @@ __glXDisp_DestroyContext(__GLXclientState * cl, GLbyte * pc)
|
||||||
&glxc, &err))
|
&glxc, &err))
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
glxc->idExists = GL_FALSE;
|
|
||||||
if (!glxc->currentClient)
|
|
||||||
FreeResourceByType(req->context, __glXContextRes, FALSE);
|
FreeResourceByType(req->context, __glXContextRes, FALSE);
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue