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
This commit is contained in:
Václav Slavík
2001-11-20 23:48:21 +00:00
parent 8fbdfa4faf
commit 31e39e3c51

View 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)