create a true empty string and not a null CFStringRef
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
63c4f6da73
commit
2539aa882d
@ -635,8 +635,12 @@ void wxMacCFStringHolder::Assign( const wxString &st , wxFontEncoding encoding )
|
||||
{
|
||||
Release() ;
|
||||
if (st.IsEmpty())
|
||||
return ;
|
||||
|
||||
{
|
||||
m_cfs = CFSTR("") ;
|
||||
CFRetain( m_cfs ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxString str = st ;
|
||||
wxMacConvertNewlines13To10( &str ) ;
|
||||
#if wxUSE_UNICODE
|
||||
@ -656,6 +660,7 @@ void wxMacCFStringHolder::Assign( const wxString &st , wxFontEncoding encoding )
|
||||
m_cfs = CFStringCreateWithCString( kCFAllocatorSystemDefault , str.c_str() ,
|
||||
wxMacGetSystemEncFromFontEnc( encoding ) ) ;
|
||||
#endif
|
||||
}
|
||||
m_release = true ;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user