functions may return a CFStringRef that is null, so we make this conversion always return an empty string (crashes otherwise)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2006-06-11 06:32:45 +00:00
parent 9f4cc34f37
commit 3a2a17cd5d

View File

@@ -666,6 +666,9 @@ void wxMacCFStringHolder::Assign( const wxString &st , wxFontEncoding encoding )
wxString wxMacCFStringHolder::AsString(wxFontEncoding encoding)
{
if ( m_cfs == NULL )
return wxEmptyString ;
Size cflen = CFStringGetLength( m_cfs ) ;
size_t noChars ;
wxChar* buf = NULL ;