guard against errors like in wxStringBase::AllocBeforeWrite code (1123226)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -107,6 +107,10 @@ wxUint32 wxMacGetSystemEncFromFontEnc(wxFontEncoding encoding)
|
|||||||
encoding = wxLocale::GetSystemEncoding() ;
|
encoding = wxLocale::GetSystemEncoding() ;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
if ( encoding == wxFONTENCODING_SYSTEM )
|
||||||
|
{
|
||||||
|
enc = CFStringGetSystemEncoding();
|
||||||
|
}
|
||||||
|
|
||||||
switch( encoding)
|
switch( encoding)
|
||||||
{
|
{
|
||||||
@@ -630,6 +634,8 @@ wxFontEncoding wxMacGetFontEncFromSystemEnc(wxUint32 encoding)
|
|||||||
void wxMacCFStringHolder::Assign( const wxString &st , wxFontEncoding encoding )
|
void wxMacCFStringHolder::Assign( const wxString &st , wxFontEncoding encoding )
|
||||||
{
|
{
|
||||||
Release() ;
|
Release() ;
|
||||||
|
if (st.IsEmpty())
|
||||||
|
return ;
|
||||||
|
|
||||||
wxString str = st ;
|
wxString str = st ;
|
||||||
wxMacConvertNewlines13To10( &str ) ;
|
wxMacConvertNewlines13To10( &str ) ;
|
||||||
|
Reference in New Issue
Block a user