riched20: Fixed crash when the window procedure is called with NULL
hWnd
Phil Krylov
phil at newstar.rinet.ru
Tue Jan 31 17:32:16 CST 2006
Hi,
This fixes bug 4452.
ChangeLog:
Fixed crash when the rich edit window procedure is called with NULL hWnd from
some braindead subclassed window procedures.
---
dlls/riched20/editor.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
f0345bcfdd038733ae03782ff41f597aef27154f
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index da5e996..1e04ece 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -1170,7 +1170,12 @@ LRESULT WINAPI RichEditANSIWndProc(HWND
TRACE("hWnd %p msg %04x (%s) %08x %08lx\n",
hWnd, msg, get_msg_name(msg), wParam, lParam);
-
+
+ /* Some braindead subclassed window procedures call the original procedure
+ * with NULL hWnd */
+ if (!hWnd)
+ return 0;
+
switch(msg) {
UNSUPPORTED_MSG(EM_AUTOURLDETECT)
--
1.0.GIT
More information about the wine-patches
mailing list