From 31e39e3c51f0a14a49ba86a5326e1461ad60dfee Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= <vslavik@fastmail.fm> Date: Tue, 20 Nov 2001 23:48:21 +0000 Subject: [PATCH] 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 --- src/mgl/dc.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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) -- 2.47.2