From: Stefan Csomor Date: Fri, 20 Oct 2006 19:29:30 +0000 (+0000) Subject: setting a non valid font is permitted, implemented now X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8bf12709e9db8e709197e3f2c7093dc2a55ee4b4 setting a non valid font is permitted, implemented now git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/graphcmn.cpp b/src/common/graphcmn.cpp index 380209a608..100387dcff 100644 --- a/src/common/graphcmn.cpp +++ b/src/common/graphcmn.cpp @@ -567,7 +567,8 @@ void wxGCDC::SetFont( const wxFont &font ) if ( m_graphicContext ) { wxFont f = font ; - f.SetPointSize( LogicalToDeviceYRel(font.GetPointSize())) ; + if ( f.Ok() ) + f.SetPointSize( LogicalToDeviceYRel(font.GetPointSize())) ; m_graphicContext->SetFont( f ); } }