Artifact
126df55ec9f9c0c04b8d841ecd83f95573a313a7:
Attachment "patch.txt" to
ticket [217982ffff]
added by
davygrvy
2001-05-10 10:02:07.
*** win/tclWinNotify.c 1999/07/02 22:08:28 1.5
--- win/tclWinNotify.c 2000/06/05 00:50:37
***************
*** 150,155 ****
--- 150,163 ----
{
ThreadSpecificData *tsdPtr = (ThreadSpecificData *) clientData;
+ /*
+ * Should the operating system call DllMain() with
+ * DLL_PROCESS_DETACH from any alternate thread path, such
+ * as Task Manager terminating the process, tsdPtr will
+ * be NULL and invalid.
+ */
+ if (tsdPtr == NULL) return;
+
DeleteCriticalSection(&tsdPtr->crit);
CloseHandle(tsdPtr->event);