From 72912228282056c9b8a0431fb45fa77f0c0e69b7 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 25 Sep 2009 13:14:31 +0000 Subject: [PATCH] Applied #8697 (Improve error detection for MacFindFont ) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/carbon/font.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/osx/carbon/font.cpp b/src/osx/carbon/font.cpp index da83253eaa..9ac75bbfbd 100644 --- a/src/osx/carbon/font.cpp +++ b/src/osx/carbon/font.cpp @@ -394,6 +394,8 @@ void wxFontRefData::MacFindFont() if ( m_fontValid ) return; + wxCHECK_RET( m_info.m_pointSize > 0, wxT("Point size should not be zero.") ); + m_info.EnsureValid(); #if wxOSX_USE_CORE_TEXT @@ -472,7 +474,8 @@ void wxFontRefData::MacFindFont() WXSIZEOF(atsuTags), atsuTags, atsuSizes, atsuValues); - wxASSERT_MSG( status == noErr , wxT("couldn't modify ATSU style") ); + wxASSERT_MSG( status == noErr , wxString::Format(wxT("couldn't modify ATSU style. Status was %d"), (int) status).c_str() ); + if ( m_cgFont.get() == NULL ) { ATSFontRef fontRef = FMGetATSFontRefFromFont(m_info.m_atsuFontID); -- 2.47.2