wined3d: Set the currently active context to NULL when it's destroyed.
Henri Verbeet
hverbeet at codeweavers.com
Mon Mar 23 02:30:15 CDT 2009
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.
---
dlls/wined3d/context.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 4ae7c3d..c7db25a 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -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) {
--
1.6.0.6
--------------060203010901020602050304--
More information about the wine-patches
mailing list