[RESEND] riched20: Fixed crash when the window procedure is called
with NULL hWnd
Phil Krylov
phil at newstar.rinet.ru
Thu Mar 16 04:41:35 CST 2006
Hi,
This patch fixes bug #4452.
ChangeLog:
riched20: Fixed crash when the window procedure is called with NULL hWnd.
---
dlls/riched20/editor.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
4bfac23c946f54c41d8fe70de8e0160d8159ab40
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 506c706..bb3767f 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -1287,7 +1287,12 @@ LRESULT WINAPI RichEditANSIWndProc(HWND
TRACE("hWnd %p msg %04x (%s) %08x %08lx\n",
hWnd, msg, get_msg_name(msg), wParam, lParam);
-
+
+ /* Some buggy subclassed window procedures call the original procedure
+ * with NULL hWnd */
+ if (!hWnd)
+ return 0;
+
switch(msg) {
UNSUPPORTED_MSG(EM_DISPLAYBAND)
--
1.1.6
More information about the wine-patches
mailing list