Applied #8697 (Improve error detection for MacFindFont )
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -394,6 +394,8 @@ void wxFontRefData::MacFindFont()
|
|||||||
if ( m_fontValid )
|
if ( m_fontValid )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
wxCHECK_RET( m_info.m_pointSize > 0, wxT("Point size should not be zero.") );
|
||||||
|
|
||||||
m_info.EnsureValid();
|
m_info.EnsureValid();
|
||||||
|
|
||||||
#if wxOSX_USE_CORE_TEXT
|
#if wxOSX_USE_CORE_TEXT
|
||||||
@@ -472,7 +474,8 @@ void wxFontRefData::MacFindFont()
|
|||||||
WXSIZEOF(atsuTags),
|
WXSIZEOF(atsuTags),
|
||||||
atsuTags, atsuSizes, atsuValues);
|
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 )
|
if ( m_cgFont.get() == NULL )
|
||||||
{
|
{
|
||||||
ATSFontRef fontRef = FMGetATSFontRefFromFont(m_info.m_atsuFontID);
|
ATSFontRef fontRef = FMGetATSFontRefFromFont(m_info.m_atsuFontID);
|
||||||
|
Reference in New Issue
Block a user