test for pen validity before calling GetStyle() on it, this asserts now if the pen is invalid
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e3d8295c33
commit
23648cb34c
@ -948,7 +948,7 @@ void wxMSWDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord h
|
||||
// (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
|
||||
#ifndef __WXWINCE__
|
||||
if ( m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT )
|
||||
if ( m_pen.IsOk() && m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT )
|
||||
{
|
||||
x2dev++;
|
||||
y2dev++;
|
||||
|
Loading…
Reference in New Issue
Block a user