From: Vadim Zeitlin Date: Fri, 30 Sep 2011 15:26:36 +0000 (+0000) Subject: Fix assert in initial call to wxPostScriptDC::SetPen(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/39429ad146448b01a0230626995cd91ba6cbd72c Fix assert in initial call to wxPostScriptDC::SetPen(). Attempt to use wxPen::GetStyle() on the initially invalid pen resulted in an assert, so don't do it and test for pen validity explicitly. Closes #13524. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index 5693d2f236..a490757cb0 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -1135,7 +1135,7 @@ void wxPostScriptDCImpl::SetPen( const wxPen& pen ) if (!pen.IsOk()) return; - int oldStyle = m_pen.GetStyle(); + int oldStyle = m_pen.IsOk() ? m_pen.GetStyle() : wxPENSTYLE_INVALID; m_pen = pen;