From 324980f86d2a8dd1b951da6388a24948805f5650 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 23 Apr 2018 21:59:26 +0300 Subject: Miranda hangs on exit --- src/mir_core/src/threads.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3