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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user