From 1db2fa6e4b7483c9747b85a988f55300b10c9ce7 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Fri, 11 Sep 2015 19:49:46 +0000 Subject: Console: fix #860 git-svn-id: http://svn.miranda-ng.org/main/trunk@15328 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Console/src/Console.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins/Console/src/Console.cpp') diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp index 4827a869d3..d23f4e37d7 100644 --- a/plugins/Console/src/Console.cpp +++ b/plugins/Console/src/Console.cpp @@ -1199,6 +1199,7 @@ static int stringCompare(LOGWIN *lw1, LOGWIN *lw2) static UINT logicons[] = { IDI_EMPTY, IDI_ARROW, IDI_IN, IDI_OUT, IDI_INFO }; +static HANDLE hConsoleThread = NULL; void InitConsole() { @@ -1230,7 +1231,7 @@ void InitConsole() LoadSettings(); - mir_forkthread(ConsoleThread, 0); + hConsoleThread = mir_forkthread(ConsoleThread, 0); HookEvent(ME_SYSTEM_PRESHUTDOWN, PreshutdownConsole); HookEvent(ME_SYSTEM_MODULESLOADED, OnSystemModulesLoaded); @@ -1249,6 +1250,10 @@ void ShutdownConsole(void) for (i = 0; i < _countof(hIcons); i++) { if (hIcons[i]) DestroyIcon(hIcons[i]); } + + if(hwndConsole) + EndDialog(hwndConsole, TRUE); + WaitForSingleObject(hConsoleThread, INFINITE); } //////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3