summaryrefslogtreecommitdiff
path: root/plugins/Console/src/Console.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-08-07 23:22:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-08-07 23:22:04 +0300
commit75dcbbdcd7402911c3eee41c05aa95dac18d7fa9 (patch)
treecb4e2479cc73e70321cbf94c150f6f7c62e983d0 /plugins/Console/src/Console.cpp
parent7174019aaafa21de765fc9e8f36f1d7c0ee7ce7a (diff)
crash fix
Diffstat (limited to 'plugins/Console/src/Console.cpp')
-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: