Huw Davies : riched20: Destroy the context before sending the notification.
Alexandre Julliard
julliard at winehq.org
Mon Mar 29 16:00:04 CDT 2021
Module: wine
Branch: master
Commit: f1f8e4d11e4eef246fb4a66eb11704994b36e510
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f1f8e4d11e4eef246fb4a66eb11704994b36e510
Author: Huw Davies <huw at codeweavers.com>
Date: Mon Mar 29 10:17:55 2021 +0100
riched20: Destroy the context before sending the notification.
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/riched20/paint.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c
index 979eb3e7365..ad9f504db8e 100644
--- a/dlls/riched20/paint.c
+++ b/dlls/riched20/paint.c
@@ -104,17 +104,16 @@ void editor_draw( ME_TextEditor *editor, HDC hDC, const RECT *update )
PatBlt( hDC, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, PATCOPY );
}
}
+
+ DeleteObject( SelectObject( hDC, brush ) );
+ SelectClipRgn( hDC, oldRgn );
+ if (oldRgn) DeleteObject( oldRgn );
+ ME_DestroyContext( &c );
+
if (editor->nTotalLength != editor->nLastTotalLength || editor->nTotalWidth != editor->nLastTotalWidth)
ME_SendRequestResize(editor, FALSE);
editor->nLastTotalLength = editor->nTotalLength;
editor->nLastTotalWidth = editor->nTotalWidth;
-
- DeleteObject( SelectObject( hDC, brush ) );
- SelectClipRgn(hDC, oldRgn);
- if (oldRgn)
- DeleteObject(oldRgn);
-
- ME_DestroyContext(&c);
}
void ME_Repaint(ME_TextEditor *editor)
More information about the wine-cvs
mailing list