[PATCH 2/5] riched20: Handle WM_DESTROY in the host.

Huw Davies huw at codeweavers.com
Wed Mar 10 03:31:17 CST 2021


Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 dlls/riched20/editor.c  | 3 ---
 dlls/riched20/txthost.c | 4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 516cd104d31..9ac5d49a3db 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -4277,9 +4277,6 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
   }
   case WM_CREATE:
     return ME_WmCreate(editor, lParam, unicode);
-  case WM_DESTROY:
-    ME_DestroyEditor(editor);
-    return 0;
   case WM_SETCURSOR:
   {
     POINT cursor_pos;
diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c
index 291c9a3b677..14cb19e8f45 100644
--- a/dlls/riched20/txthost.c
+++ b/dlls/riched20/txthost.c
@@ -778,6 +778,10 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
     editor = host->editor;
     switch (msg)
     {
+    case WM_DESTROY:
+        ITextHost_Release( &host->ITextHost_iface );
+        return 0;
+
     case WM_ERASEBKGND:
     {
         HDC hdc = (HDC)wparam;
-- 
2.23.0




More information about the wine-devel mailing list