From: Vadim Zeitlin Date: Sat, 12 Apr 2008 21:07:19 +0000 (+0000) Subject: test for pen validity before calling GetStyle() on it, this asserts now if the pen... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/23648cb34ceb91ab02394ae72ebd4825b9e2f2a5 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 --- diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 1db02a2c57..e95edd53b8 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -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++;