summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/miranda.cpp2
-rw-r--r--src/mir_core/src/threads.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/core/miranda.cpp b/src/core/miranda.cpp
index c2f92d7e9d..b5b65f8d40 100644
--- a/src/core/miranda.cpp
+++ b/src/core/miranda.cpp
@@ -266,7 +266,7 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR cmdLine, int)
DWORD pid = 0;
checkIdle(&msg);
if (h != NULL && GetWindowThreadProcessId(h, &pid) && pid == myPid && GetClassLongPtr(h, GCW_ATOM) == 32770)
- if (IsDialogMessage(h, &msg))
+ if (h != NULL && IsDialogMessage(h, &msg)) /* Wine fix. */
continue;
TranslateMessage(&msg);
diff --git a/src/mir_core/src/threads.cpp b/src/mir_core/src/threads.cpp
index 5ab917460f..237bc2ed97 100644
--- a/src/mir_core/src/threads.cpp
+++ b/src/mir_core/src/threads.cpp
@@ -44,7 +44,8 @@ static int MirandaWaitForMutex(HANDLE hEvent)
if (rc == WAIT_OBJECT_0 + 1) {
MSG msg;
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
- if (IsDialogMessage(msg.hwnd, &msg)) continue;
+ if (msg.hwnd != NULL && IsDialogMessage(msg.hwnd, &msg)) /* Wine fix. */
+ continue;
TranslateMessage(&msg);
DispatchMessage(&msg);
}