]> git.saurik.com Git - wxWidgets.git/commitdiff
Allow an app to call SetFont on a PS DC without assertion
authorJulian Smart <julian@anthemion.co.uk>
Wed, 3 Mar 2004 13:32:24 +0000 (13:32 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 3 Mar 2004 13:32:24 +0000 (13:32 +0000)
(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

index ed4bf8e189706d79f894bb6e5f9fd8bbdb70646d..d7477c3892cf87cfead4e526ec599956ea62518f 100644 (file)
@@ -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 );