Commit 1f4e7b27 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

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.
parent 89721c21
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment