From: Stefan Csomor Date: Sun, 11 Jun 2006 06:32:45 +0000 (+0000) Subject: functions may return a CFStringRef that is null, so we make this conversion always... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3a2a17cd5d7734638d87979482d7359f89554617 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 --- diff --git a/src/mac/corefoundation/cfstring.cpp b/src/mac/corefoundation/cfstring.cpp index 078df1e308..2661bb0af8 100644 --- a/src/mac/corefoundation/cfstring.cpp +++ b/src/mac/corefoundation/cfstring.cpp @@ -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 ;