]> git.saurik.com Git - wxWidgets.git/commitdiff
test for pen validity before calling GetStyle() on it, this asserts now if the pen...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 12 Apr 2008 21:07:19 +0000 (21:07 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 12 Apr 2008 21:07:19 +0000 (21:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/dc.cpp

index 1db02a2c5733603c8ba8be74a52a0b44db1750ce..e95edd53b8f54841be2fda12e8723f55c29c7c4e 100644 (file)
@@ -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++;