diff options
author | George Hazan <george.hazan@gmail.com> | 2013-02-19 20:53:40 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-02-19 20:53:40 +0000 |
commit | cf9da90f48c5d8b415c449eb42434d4843610c5d (patch) | |
tree | f512c19242a6c3fff8494fa0b3c8f4ac4a253c3a /plugins/Clist_modern/src/modern_awaymsg.cpp | |
parent | c57feab63e9b3a3f087fa1bfee21be635d28ada8 (diff) |
miranda hangs up when one of the standard modules is missing
git-svn-id: http://svn.miranda-ng.org/main/trunk@3645 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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);
}
|