[PATCH 0/1] MR2860: gdi32: Mark objects as not used before clearing handles table in emf_reset.
It should fix [bug 54936](https://bugs.winehq.org/show_bug.cgi?id=54936). I'm expecting this change to also affect [bug 54956](https://bugs.winehq.org/show_bug.cgi?id=54956). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2860
From: Piotr Caban <piotr(a)codeweavers.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54936 --- dlls/gdi32/emfdc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/gdi32/emfdc.c b/dlls/gdi32/emfdc.c index 5c3d01e43b1..57f39e4c162 100644 --- a/dlls/gdi32/emfdc.c +++ b/dlls/gdi32/emfdc.c @@ -2521,7 +2521,11 @@ static void emf_reset( DC_ATTR *dc_attr, const RECT *rect ) { struct emf *emf = get_dc_emf( dc_attr ); HDC hdc = dc_attr_handle( dc_attr ); + int i; + for (i = 0; i < emf->handles_size; i++) + if (emf->handles[i]) + GDI_hdc_not_using_object( emf->handles[i], dc_attr_handle( emf->dc_attr )); memset( emf->handles, 0, emf->handles_size * sizeof(emf->handles[0]) ); emf->cur_handles = 1; emf->file = 0; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/2860
This merge request was approved by Huw Davies. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2860
participants (3)
-
Huw Davies (@huw) -
Piotr Caban -
Piotr Caban (@piotr)