Mesa (master): wgl: Go into dormant state when DLL is unloaded unclealy.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Fri Feb 12 23:43:49 UTC 2010


Module: Mesa
Branch: master
Commit: a80d988144efad54e7a99920f8681e28243e9e9a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a80d988144efad54e7a99920f8681e28243e9e9a

Author: José Fonseca <jfonseca at vmware.com>
Date:   Fri Feb 12 13:59:16 2010 +0000

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.

---

 src/gallium/state_trackers/wgl/stw_device.c |    1 +
 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 ce6fe5f..e5fa6ac 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;
    }
 




More information about the mesa-commit mailing list