summaryrefslogtreecommitdiff
path: root/plugins/Console/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-09-09 22:24:07 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-09-09 22:24:07 +0300
commit23f0b751b57b2dd9f6e912cec92364ff59b864b2 (patch)
tree9b38146c3602b5300856d00bedfc248bce5c7da0 /plugins/Console/src
parent77a3554616362939d78649fd257f65e464312e68 (diff)
fix for a crappy ::GetCurrentThread call that breaks all Wait* functions
Diffstat (limited to 'plugins/Console/src')
-rw-r--r--plugins/Console/src/Console.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp
index a874f8c4cd..d6c3d5dc6e 100644
--- a/plugins/Console/src/Console.cpp
+++ b/plugins/Console/src/Console.cpp
@@ -891,10 +891,9 @@ static INT_PTR CALLBACK ConsoleDlgProc(HWND hwndDlg, UINT message, WPARAM wParam
////////////////////////////////////////////////////////////////////////////////
-
-void __cdecl ConsoleThread(void*)
+static void __cdecl ConsoleThread(void*)
{
- MThreadHandle threadLock(g_plugin.hConsoleThread);
+ MThreadLock threadLock(g_plugin.hConsoleThread);
CoInitialize(nullptr);
HWND hwnd = CreateDialog(g_plugin.getInst(), MAKEINTRESOURCE(IDD_CONSOLE), nullptr, ConsoleDlgProc);
@@ -1210,7 +1209,7 @@ void InitConsole()
LoadSettings();
- mir_forkthread(ConsoleThread);
+ g_plugin.hConsoleThread = mir_forkthread(ConsoleThread);
HookEvent(ME_SYSTEM_PRESHUTDOWN, PreshutdownConsole);
HookEvent(ME_SYSTEM_MODULESLOADED, OnSystemModulesLoaded);