From: Václav Slavík Date: Tue, 20 Nov 2001 23:48:21 +0000 (+0000) Subject: wxDC::SetFont can now handle invalid font and doesn't assert anymore (other ports... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/31e39e3c51f0a14a49ba86a5326e1461ad60dfee?ds=inline wxDC::SetFont can now handle invalid font and doesn't assert anymore (other ports behave this way) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mgl/dc.cpp b/src/mgl/dc.cpp index 6d1111607d..692ac021d4 100644 --- a/src/mgl/dc.cpp +++ b/src/mgl/dc.cpp @@ -1114,9 +1114,11 @@ void wxDC::SetPalette(const wxPalette& palette) void wxDC::SetFont(const wxFont& font) { - wxCHECK_RET( font.Ok(), wxT("invalid font") ); - m_font = font; - m_mglFont = NULL; + if ( font.Ok() ) + { + m_font = font; + m_mglFont = NULL; + } } void wxDC::SetBackground(const wxBrush& brush)