From: José Fonseca Date: Fri, 12 Feb 2010 13:59:16 +0000 (+0000) Subject: wgl: Go into dormant state when DLL is unloaded unclealy. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a80d988144efad54e7a99920f8681e28243e9e9a;p=mesa.git 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. --- diff --git a/src/gallium/state_trackers/wgl/stw_device.c b/src/gallium/state_trackers/wgl/stw_device.c index ce6fe5f4ef5..e5fa6ac8eb4 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; }