From 90fc3521557ae33352dcc7baa87828b6bb0ca2b9 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 6 Aug 2013 18:52:28 +0000 Subject: fix for very rare crash on slow machines git-svn-id: http://svn.miranda-ng.org/main/trunk@5604 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SeenPlugin/src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins/SeenPlugin/src/main.cpp') diff --git a/plugins/SeenPlugin/src/main.cpp b/plugins/SeenPlugin/src/main.cpp index 4cd3e6b492..8468421e53 100644 --- a/plugins/SeenPlugin/src/main.cpp +++ b/plugins/SeenPlugin/src/main.cpp @@ -48,6 +48,8 @@ DBVTranslation idleTr[TRANSNUMBER]={ BOOL includeIdle; LIST arContacts(16, HandleKeySortT); +CRITICAL_SECTION csContacts; + int MainInit(WPARAM,LPARAM) { @@ -97,6 +99,7 @@ extern "C" __declspec(dllexport) int Load(void) mir_getLP(&pluginInfo); g_hShutdownEvent = CreateEvent(0, TRUE, FALSE, 0); + InitializeCriticalSection(&csContacts); HookEvent(ME_SYSTEM_MODULESLOADED, MainInit); HookEvent(ME_SYSTEM_PRESHUTDOWN, OnShutdown); @@ -114,6 +117,7 @@ extern "C" __declspec(dllexport) int Unload(void) UnhookEvent(ehmissed); arContacts.destroy(); + DeleteCriticalSection(&csContacts); CloseHandle(g_hShutdownEvent); return 0; } -- cgit v1.2.3