Commit 19e27e95 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

explorer: Fix font handle leaks in virtual desktop.

parent 4fc1591f
...@@ -271,7 +271,8 @@ static void draw_launchers( HDC hdc, RECT update_rect ) ...@@ -271,7 +271,8 @@ static void draw_launchers( HDC hdc, RECT update_rect )
DT_CENTER|DT_WORDBREAK|DT_EDITCONTROL|DT_END_ELLIPSIS ); DT_CENTER|DT_WORDBREAK|DT_EDITCONTROL|DT_END_ELLIPSIS );
} }
SelectObject( hdc, font ); font = SelectObject( hdc, font );
DeleteObject( font );
SetTextColor( hdc, color ); SetTextColor( hdc, color );
SetBkMode( hdc, mode ); SetBkMode( hdc, mode );
} }
...@@ -433,7 +434,8 @@ static BOOL get_icon_text_metrics( HWND hwnd, TEXTMETRICW *tm ) ...@@ -433,7 +434,8 @@ static BOOL get_icon_text_metrics( HWND hwnd, TEXTMETRICW *tm )
SystemParametersInfoW( SPI_GETICONTITLELOGFONT, sizeof(lf), &lf, 0 ); SystemParametersInfoW( SPI_GETICONTITLELOGFONT, sizeof(lf), &lf, 0 );
hfont = SelectObject( hdc, CreateFontIndirectW( &lf ) ); hfont = SelectObject( hdc, CreateFontIndirectW( &lf ) );
ret = GetTextMetricsW( hdc, tm ); ret = GetTextMetricsW( hdc, tm );
SelectObject( hdc, hfont ); hfont = SelectObject( hdc, hfont );
DeleteObject( hfont );
ReleaseDC( hwnd, hdc ); ReleaseDC( hwnd, hdc );
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment