From 29402f455b8c556acefcaa88fa6fc03d219156d4 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 3 Mar 2004 13:32:24 +0000 Subject: [PATCH] Allow an app to call SetFont on a PS DC without assertion (should be possible to use SetFont before StartDoc). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/dcpsg.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 ); -- 2.45.2