summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/Console/src/Console.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp
index 5b2a737243..e5bd79a6a1 100644
--- a/plugins/Console/src/Console.cpp
+++ b/plugins/Console/src/Console.cpp
@@ -894,13 +894,13 @@ static INT_PTR CALLBACK ConsoleDlgProc(HWND hwndDlg, UINT message, WPARAM wParam
void __cdecl ConsoleThread(void*)
{
- MSG msg;
- HWND hwnd;
+ CoInitialize(nullptr);
- hwnd = CreateDialog(g_plugin.getInst(), MAKEINTRESOURCE(IDD_CONSOLE), nullptr, ConsoleDlgProc);
-
- if (!hwnd) return;
+ HWND hwnd = CreateDialog(g_plugin.getInst(), MAKEINTRESOURCE(IDD_CONSOLE), nullptr, ConsoleDlgProc);
+ if (!hwnd)
+ return;
+ MSG msg;
while (GetMessage(&msg, nullptr, 0, 0) > 0) {
switch (msg.message) {
case HM_DUMP: