Applied patch [ 613113 ] "GDI Object" leak in wxOwnerDraw

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2002-10-02 13:42:23 +00:00
parent 6397b59b65
commit af2e6a4295

View File

@@ -241,8 +241,6 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
FillRect(hdc, &rectFill, hbr);
DeleteObject(hbr);
// use default font if no font set
HFONT hfont;
if ( m_font.Ok() ) {
@@ -278,6 +276,8 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
(void)SelectObject(hdc, hPrevBrush);
(void)SelectObject(hdc, hPrevFont);
(void)SetBkMode(hdc, nPrevMode);
DeleteObject(hbr);
#else
dc.SetFont(GetFont());
dc.DrawText(wxStripMenuCodes(m_strName), x, rc.y);