diff options
Diffstat (limited to 'src/mir_core/miranda.cpp')
-rw-r--r-- | src/mir_core/miranda.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mir_core/miranda.cpp b/src/mir_core/miranda.cpp index 9a3719f845..57c126bdbe 100644 --- a/src/mir_core/miranda.cpp +++ b/src/mir_core/miranda.cpp @@ -97,5 +97,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) mir_tls = TlsAlloc();
LoadCoreModule();
}
+ else if (fdwReason == DLL_THREAD_DETACH) {
+ HANDLE hEvent = TlsGetValue(mir_tls);
+ if (hEvent)
+ CloseHandle(hEvent);
+ }
return TRUE;
}
|