X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5c7b506103cfc078a821860766e31c47d595e07f..947f3b358cae28b63c6f69af21c493cab355fb7e:/src/mac/carbon/fontdlg.cpp diff --git a/src/mac/carbon/fontdlg.cpp b/src/mac/carbon/fontdlg.cpp index 7c037fc8b4..e7892ad542 100644 --- a/src/mac/carbon/fontdlg.cpp +++ b/src/mac/carbon/fontdlg.cpp @@ -66,7 +66,7 @@ wxMacCarbonFontPanelHandler(EventHandlerCallRef WXUNUSED(nextHandler), OSStatus result = eventNotHandledErr ; wxFontDialog *fontdialog = (wxFontDialog*) userData ; wxFontData& fontdata= fontdialog->GetFontData() ; - + wxMacCarbonEvent cEvent( event ); switch(cEvent.GetKind()) { @@ -92,13 +92,16 @@ wxMacCarbonFontPanelHandler(EventHandlerCallRef WXUNUSED(nextHandler), { FMFontStyle fontStyle = cEvent.GetParameter(kEventParamFMFontStyle); FMFontSize fontSize = cEvent.GetParameter(kEventParamFMFontSize); - + CFStringRef cfName = NULL; #if 1 FMFontFamily fontFamily = cEvent.GetParameter(kEventParamFMFontFamily); ATSFontFamilyRef atsfontfamilyref = FMGetATSFontFamilyRefFromFontFamily( fontFamily ) ; OSStatus err = ATSFontFamilyGetName( atsfontfamilyref , kATSOptionFlagsDefault , &cfName ) ; - wxASSERT_MSG( err == noErr , wxT("ATSFontFamilyGetName failed") ); + if ( err == noErr ) + { + wxFAIL_MSG("ATSFontFamilyGetName failed"); + } #else // we don't use the ATSU naming anymore ByteCount actualLength = 0; @@ -140,7 +143,7 @@ wxMacCarbonFontPanelHandler(EventHandlerCallRef WXUNUSED(nextHandler), } } #endif // wxMAC_USE_ATSU_TEXT - + // retrieving the color RGBColor fontColor ; if ( cEvent.GetParameter(kEventParamFontColor, &fontColor) == noErr ) @@ -181,9 +184,9 @@ wxMacCarbonFontPanelHandler(EventHandlerCallRef WXUNUSED(nextHandler), } } } - break ; - } ; - + break ; + } + return result ; }