diff options
Diffstat (limited to 'plugins/Clist_modern/src/modern_awaymsg.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_awaymsg.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/Clist_modern/src/modern_awaymsg.cpp b/plugins/Clist_modern/src/modern_awaymsg.cpp index 34dc4ad51c..a03e61bec2 100644 --- a/plugins/Clist_modern/src/modern_awaymsg.cpp +++ b/plugins/Clist_modern/src/modern_awaymsg.cpp @@ -189,10 +189,8 @@ static int amThreadProc(HWND hwnd) BOOL amWakeThread()
{
- if (hamProcessEvent && g_dwAwayMsgThreadID)
- {
+ if (hamProcessEvent && g_dwAwayMsgThreadID) {
SetEvent(hamProcessEvent);
-
return TRUE;
}
@@ -224,9 +222,10 @@ void InitAwayMsgModule() void UninitAwayMsgModule()
{
SetEvent(hamProcessEvent);
+
+ while (g_dwAwayMsgThreadID)
+ SleepEx(50, TRUE);
+
CloseHandle(hamProcessEvent);
- amlock;
- while (amGetCurrentChain());
- amunlock;
DeleteCriticalSection(&amLockChain);
}
|