diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index ed4bf8e189..d7477c3892 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 );