diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-23 21:59:26 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-23 21:59:33 +0300 |
commit | 324980f86d2a8dd1b951da6388a24948805f5650 (patch) | |
tree | 0299dfaf71d72a521975502c75be37f6c5753c4e /src | |
parent | aaf98f7393476d063d25cc25cb4ffd03541e8cf3 (diff) |
Miranda hangs on exit
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_core/src/threads.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mir_core/src/threads.cpp b/src/mir_core/src/threads.cpp index de9474a101..0b564ecbd3 100644 --- a/src/mir_core/src/threads.cpp +++ b/src/mir_core/src/threads.cpp @@ -252,7 +252,8 @@ MIR_CORE_DLL(void) KillObjectThreads(void* owner) DWORD dwTicks = GetTickCount() + 6000;
HANDLE hThread = mir_forkthread(KillObjectThreadsWorker, owner);
while (GetTickCount() < dwTicks) {
- if (WAIT_OBJECT_0 == MsgWaitForMultipleObjectsEx(1, &hThread, 50, QS_ALLPOSTMESSAGE | QS_ALLINPUT, MWMO_ALERTABLE))
+ int res = MsgWaitForMultipleObjectsEx(1, &hThread, 50, QS_ALLPOSTMESSAGE | QS_ALLINPUT, MWMO_ALERTABLE);
+ if (res == WAIT_OBJECT_0 || res == WAIT_FAILED)
break;
MSG msg;
|