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
This commit is contained in:
Vadim Zeitlin 2011-09-30 15:26:36 +00:00
parent 2cf6960074
commit 39429ad146

View File

@ -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;