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

Huw Davies huw at codeweavers.com
Thu Mar 11 02:51:00 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 51dccf3b7ed..9f183def2dd 100644
--- a/dlls/riched20/txthost.c
+++ b/dlls/riched20/txthost.c
@@ -780,6 +780,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