Signed-off-by: Huw Davies huw@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;