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:
parent
89721c2173
commit
1f4e7b27ed
|
@ -1010,6 +1010,12 @@ void DestroyContext(IWineD3DDeviceImpl *This, WineD3DContext *context) {
|
||||||
|
|
||||||
LEAVE_GL();
|
LEAVE_GL();
|
||||||
|
|
||||||
|
if (This->activeContext == context)
|
||||||
|
{
|
||||||
|
This->activeContext = NULL;
|
||||||
|
TRACE("Destroying the active context.\n");
|
||||||
|
}
|
||||||
|
|
||||||
/* Cleanup the GL context */
|
/* Cleanup the GL context */
|
||||||
pwglMakeCurrent(NULL, NULL);
|
pwglMakeCurrent(NULL, NULL);
|
||||||
if(context->isPBuffer) {
|
if(context->isPBuffer) {
|
||||||
|
|
Loading…
Reference in New Issue