Commit d9e79807 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Protect CallWindowProcA/W from NULL pointers.

parent f9100240
......@@ -2867,9 +2867,12 @@ LRESULT WINAPI CallWindowProcA(
WPARAM wParam, /* [in] message dependent parameter */
LPARAM lParam /* [in] message dependent parameter */
) {
WINDOWPROC *proc = WINPROC_GetPtr( func );
WINDOWPROC *proc;
if (!func) return 0;
if (!proc) return WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam );
if (!(proc = WINPROC_GetPtr( func )))
return WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam );
#if testing
func = WINPROC_GetProc( (WNDPROC)proc, WIN_PROC_32A );
......@@ -2903,9 +2906,12 @@ LRESULT WINAPI CallWindowProcA(
LRESULT WINAPI CallWindowProcW( WNDPROC func, HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam )
{
WINDOWPROC *proc = WINPROC_GetPtr( func );
WINDOWPROC *proc;
if (!proc) return WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam );
if (!func) return 0;
if (!(proc = WINPROC_GetPtr( (WNDPROC)func )))
return WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam );
#if testing
func = WINPROC_GetProc( (WNDPROC)proc, WIN_PROC_32W );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment