don't use dangling HBRUSH
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -802,8 +802,12 @@ void wxNotebook::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||
|
||||
// if there is no special brush just use the solid background colour
|
||||
HBRUSH hbr = (HBRUSH)m_hbrBackground;
|
||||
wxBrush brush;
|
||||
if ( !hbr )
|
||||
hbr = GetHbrushOf(wxBrush(GetBackgroundColour()));
|
||||
{
|
||||
brush = wxBrush(GetBackgroundColour());
|
||||
hbr = GetHbrushOf(brush);
|
||||
}
|
||||
|
||||
::FillRect(GetHdcOf(memdc), &rc, hbr);
|
||||
|
||||
|
Reference in New Issue
Block a user