]> git.saurik.com Git - wxWidgets.git/commitdiff
adding an assert for invalid fonts
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 18 May 2006 14:43:54 +0000 (14:43 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 18 May 2006 14:43:54 +0000 (14:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/font.cpp

index 522bd7ee1c80e8620dee21cd69200ad4b719a341..9f08a80e6be74628e4decd9645ebf46c97a14205 100644 (file)
@@ -269,6 +269,7 @@ void wxFontRefData::MacFindFont()
             {
                 wxMacCFStringHolder cf( m_faceName, wxLocale::GetSystemEncoding() );
                 ATSFontFamilyRef atsfamily = ATSFontFamilyFindFromName( cf , kATSOptionFlagsDefault );
+                wxASSERT_MSG( atsfamily != (ATSFontFamilyRef) -1 , wxT("ATSFontFamilyFindFromName failed") );
                 m_macFontFamily = FMGetFontFamilyFromATSFontFamilyRef( atsfamily );
             }
         }