summaryrefslogtreecommitdiff
path: root/src/mir_core/miranda.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir_core/miranda.cpp')
-rw-r--r--src/mir_core/miranda.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mir_core/miranda.cpp b/src/mir_core/miranda.cpp
index 61b14ced06..9a3719f845 100644
--- a/src/mir_core/miranda.cpp
+++ b/src/mir_core/miranda.cpp
@@ -33,6 +33,7 @@ int hLangpack = 0;
HINSTANCE hInst = 0;
HANDLE hStackMutex, hThreadQueueEmpty;
+DWORD mir_tls = 0;
/////////////////////////////////////////////////////////////////////////////////////////
// module init
@@ -80,6 +81,7 @@ MIR_CORE_DLL(void) UnloadCoreModule(void)
DestroyWindow(hAPCWindow);
CloseHandle(hStackMutex);
CloseHandle(hThreadQueueEmpty);
+ TlsFree(mir_tls);
DestroyModularEngine();
UnloadLangPackModule();
@@ -92,6 +94,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH) {
hInst = hinstDLL;
+ mir_tls = TlsAlloc();
LoadCoreModule();
}
return TRUE;