From: Huw Davies huw@codeweavers.com
Signed-off-by: Huw Davies huw@codeweavers.com --- dlls/gdi32/emfdc.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/dlls/gdi32/emfdc.c b/dlls/gdi32/emfdc.c index eec700de327..d215162d8d0 100644 --- a/dlls/gdi32/emfdc.c +++ b/dlls/gdi32/emfdc.c @@ -2426,7 +2426,6 @@ HDC WINAPI CreateEnhMetaFileW( HDC hdc, const WCHAR *filename, const RECT *rect, DeleteDC( ret ); return 0; } - emf->dc_attr = dc_attr;
emf->handles = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, HANDLE_LIST_INC * sizeof(emf->handles[0]) );
From: Huw Davies huw@codeweavers.com
Signed-off-by: Huw Davies huw@codeweavers.com --- dlls/gdi32/emfdc.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/gdi32/emfdc.c b/dlls/gdi32/emfdc.c index d215162d8d0..56327abff8a 100644 --- a/dlls/gdi32/emfdc.c +++ b/dlls/gdi32/emfdc.c @@ -2321,6 +2321,8 @@ void EMFDC_DeleteDC( DC_ATTR *dc_attr ) if (emf->handles[index]) GDI_hdc_not_using_object( emf->handles[index], emf->dc_attr->hdc ); HeapFree( GetProcessHeap(), 0, emf->handles ); + HeapFree( GetProcessHeap(), 0, emf ); + dc_attr->emf = NULL; }
/*******************************************************************
This merge request was approved by Jacek Caban.