summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-02-12 13:59:16 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-02-12 23:38:19 +0000
commita80d988144efad54e7a99920f8681e28243e9e9a (patch)
treeb22465e4f85418c2fe2deed1bdb843e63b607a77 /src
parent57617c8eba7093be3da9d818389ef5f18246e4ca (diff)
wgl: Go into dormant state when DLL is unloaded unclealy.
When our DLL is unloaded, even if we leave the data structures in memory for sake of future calls, the MS CRT will destroy the heap. Instead we make all calls no-ops by setting stw_dev to NULL.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/wgl/stw_device.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/wgl/stw_device.c b/src/gallium/state_trackers/wgl/stw_device.c
index ce6fe5f4ef..e5fa6ac8eb 100644
--- a/src/gallium/state_trackers/wgl/stw_device.c
+++ b/src/gallium/state_trackers/wgl/stw_device.c
@@ -168,6 +168,7 @@ stw_cleanup(void)
pipe_mutex_unlock( stw_dev->ctx_mutex );
if (dhglrc) {
debug_printf("%s: contexts still active -- cleanup aborted\n", __FUNCTION__);
+ stw_dev = NULL;
return;
}