Author: cwittich
Date: Mon Jul 30 12:44:52 2007
New Revision: 28037
URL:
http://svn.reactos.org/svn/reactos?rev=28037&view=rev
Log:
fix broken condition in CallWindowProc
Modified:
trunk/reactos/dll/win32/user32/windows/message.c
Modified: trunk/reactos/dll/win32/user32/windows/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/message.c (original)
+++ trunk/reactos/dll/win32/user32/windows/message.c Mon Jul 30 12:44:52 2007
@@ -1239,16 +1239,19 @@
if (lpPrevWndFunc == NULL)
lpPrevWndFunc = (WNDPROC)NtUserGetWindowLong(hWnd, GWLP_WNDPROC, TRUE);
- if (!IsCallProcHandle(lpPrevWndFunc) ||
- !NtUserDereferenceWndProcHandle((HANDLE)lpPrevWndFunc,
+ if (!IsCallProcHandle(lpPrevWndFunc))
+ return IntCallWindowProcA(TRUE, lpPrevWndFunc, hWnd, Msg, wParam, lParam);
+ else
+ {
+ if (NtUserDereferenceWndProcHandle((HANDLE)lpPrevWndFunc,
&wpInfo))
- {
- return IntCallWindowProcA(TRUE, lpPrevWndFunc, hWnd, Msg, wParam, lParam);
- }
- else
- {
- return IntCallWindowProcA(!wpInfo.IsUnicode, wpInfo.WindowProc,
- hWnd, Msg, wParam, lParam);
+ return IntCallWindowProcA(!wpInfo.IsUnicode, wpInfo.WindowProc,
+ hWnd, Msg, wParam, lParam);
+ else
+ {
+ DPRINT("CallWindowProcA: can not dereference WndProcHandle\n");
+ return 0;
+ }
}
}
@@ -1269,17 +1272,20 @@
if (lpPrevWndFunc == NULL)
lpPrevWndFunc = (WNDPROC)NtUserGetWindowLong(hWnd, GWLP_WNDPROC, FALSE);
- if (!IsCallProcHandle(lpPrevWndFunc) ||
- !NtUserDereferenceWndProcHandle((HANDLE)lpPrevWndFunc,
+ if (!IsCallProcHandle(lpPrevWndFunc))
+ return IntCallWindowProcW(FALSE, lpPrevWndFunc, hWnd, Msg, wParam, lParam);
+ else
+ {
+ if (NtUserDereferenceWndProcHandle((HANDLE)lpPrevWndFunc,
&wpInfo))
- {
- return IntCallWindowProcW(FALSE, lpPrevWndFunc, hWnd, Msg, wParam, lParam);
- }
- else
- {
return IntCallWindowProcW(!wpInfo.IsUnicode, wpInfo.WindowProc,
hWnd, Msg, wParam, lParam);
- }
+ else
+ {
+ DPRINT("CallWindowProcW: can not dereference WndProcHandle\n");
+ return 0;
+ }
+ }
}