gdiplus: font.c: ensure to release resources

Huw Davies h.davies1 at physics.ox.ac.uk
Thu Jun 26 14:00:05 CDT 2008


Joris Huizer wrote:
> A modified patch, taking hints into account from Huw Davies
> 

You need to select out the hfont before deleting it.

So the SelectObject should look like
hfont_old = SelectObject(hdc, hfont);
then after the
GetTextMetrics
do
DeleteObject(SelectObject(hdc, hfont_old))

(then you don't need the two sets of DeleteObject)

Huw.



More information about the wine-devel mailing list