X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/793db75554d2d2bc5dc9b0fc42c0b7aa03a44183..8f4d9fcd9a1133442aa733e978231b01956e641b:/src/generic/dcpsg.cpp diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index ed4bf8e189..0cfafaaabc 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -1011,6 +1011,10 @@ void wxPostScriptDC::SetFont( const wxFont& font ) } } + // We may legitimately call SetFont before BeginDoc + if (!m_pstream) + return; + PsPrint( name ); PsPrint( " reencodeISO def\n" ); PsPrint( name ); @@ -1775,7 +1779,7 @@ bool wxPostScriptDC::StartDoc( const wxString& message ) { wxCHECK_MSG( m_ok, FALSE, wxT("invalid postscript dc") ); - if ( m_printData.GetPrintMode() == wxPRINT_MODE_FILE ) + if ( m_printData.GetPrintMode() != wxPRINT_MODE_STREAM ) { if (m_printData.GetFilename() == wxT("")) {