mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-30 22:38:11 +02:00
wgl: Catch the attempt of releasing a context which is not current.
This commit is contained in:
parent
858d3da441
commit
564ba25386
1 changed files with 8 additions and 1 deletions
|
|
@ -231,10 +231,17 @@ stw_release_context(
|
|||
if (!ctx)
|
||||
return FALSE;
|
||||
|
||||
/* XXX: The expectation is that ctx is the same context which is
|
||||
/* The expectation is that ctx is the same context which is
|
||||
* current for this thread. We should check that and return False
|
||||
* if not the case.
|
||||
*/
|
||||
{
|
||||
GLcontext *glctx = ctx->st->ctx;
|
||||
GET_CURRENT_CONTEXT( glcurctx );
|
||||
|
||||
if (glcurctx != glctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (stw_make_current( NULL, 0 ) == FALSE)
|
||||
return FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue