diff --git a/reactos/dll/win32/user32/windows/message.c b/reactos/dll/win32/user32/windows/message.c index f4bf39cde4d..78794293b0c 100644 --- a/reactos/dll/win32/user32/windows/message.c +++ b/reactos/dll/win32/user32/windows/message.c @@ -1141,6 +1141,12 @@ IntCallWindowProcW(BOOL IsAnsiProc, MSG UnicodeMsg; LRESULT Result; + if (WndProc == NULL) + { + DPRINT1("IntCallWindowsProcW() called with WndProc = NULL!\n"); + return FALSE; + } + if (IsAnsiProc) { UnicodeMsg.hwnd = hWnd; @@ -1177,6 +1183,12 @@ IntCallWindowProcA(BOOL IsAnsiProc, MSG UnicodeMsg; LRESULT Result; + if (WndProc == NULL) + { + DPRINT1("IntCallWindowsProcA() called with WndProc = NULL!\n"); + return FALSE; + } + if (IsAnsiProc) { return WndProc(hWnd, Msg, wParam, lParam);