]> git.saurik.com Git - wxWidgets.git/commitdiff
wxDC::SetFont can now handle invalid font and doesn't assert anymore (other ports...
authorVáclav Slavík <vslavik@fastmail.fm>
Tue, 20 Nov 2001 23:48:21 +0000 (23:48 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Tue, 20 Nov 2001 23:48:21 +0000 (23:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mgl/dc.cpp

index 6d1111607dbdcbea5ba0e0e9950c491ee819a048..692ac021d420f8f06e7b6ccf1324cb327aa49a2b 100644 (file)
@@ -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)