wined3d: Set the currently active context to NULL when it's destroyed.

This should make us crash when trying to use the "currently active" context
after it has been destroyed, rather than messing around with freed memory.
This commit is contained in:
Henri Verbeet 2009-03-23 08:30:15 +01:00 committed by Alexandre Julliard
parent 89721c2173
commit 1f4e7b27ed
1 changed files with 6 additions and 0 deletions

View File

@ -1010,6 +1010,12 @@ void DestroyContext(IWineD3DDeviceImpl *This, WineD3DContext *context) {
LEAVE_GL();
if (This->activeContext == context)
{
This->activeContext = NULL;
TRACE("Destroying the active context.\n");
}
/* Cleanup the GL context */
pwglMakeCurrent(NULL, NULL);
if(context->isPBuffer) {