From: Alex Henrie alexhenrie24@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56133 --- programs/explorer/desktop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index 25bba7cb7cb..a18c9806d42 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -271,7 +271,8 @@ static void draw_launchers( HDC hdc, RECT update_rect ) DT_CENTER|DT_WORDBREAK|DT_EDITCONTROL|DT_END_ELLIPSIS ); }
- SelectObject( hdc, font ); + font = SelectObject( hdc, font ); + DeleteObject( font ); SetTextColor( hdc, color ); SetBkMode( hdc, mode ); } @@ -433,7 +434,8 @@ static BOOL get_icon_text_metrics( HWND hwnd, TEXTMETRICW *tm ) SystemParametersInfoW( SPI_GETICONTITLELOGFONT, sizeof(lf), &lf, 0 ); hfont = SelectObject( hdc, CreateFontIndirectW( &lf ) ); ret = GetTextMetricsW( hdc, tm ); - SelectObject( hdc, hfont ); + hfont = SelectObject( hdc, hfont ); + DeleteObject( hfont ); ReleaseDC( hwnd, hdc ); return ret; }