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

Jose Fonseca jrfonseca at kemper.freedesktop.org
Fri Feb 12 14:19:41 UTC 2010


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

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