Don't use possibly uninitialized pen in wxMSWDCImpl.
Check that m_pen is valid before checking if it is transparent in DoDrawRoundedRectangle() too (this was already done in DoDrawRectangle() in r53150). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -965,7 +965,7 @@ void wxMSWDCImpl::DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wx
|
||||
// Windows draws the filled rectangles without outline (i.e. drawn with a
|
||||
// transparent pen) one pixel smaller in both directions and we want them
|
||||
// to have the same size regardless of which pen is used - adjust
|
||||
if ( m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT )
|
||||
if ( m_pen.IsOk() && m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT )
|
||||
{
|
||||
x2++;
|
||||
y2++;
|
||||
|
Reference in New Issue
Block a user