functions may return a CFStringRef that is null, so we make this conversion always...
authorStefan Csomor <csomor@advancedconcepts.ch>
Sun, 11 Jun 2006 06:32:45 +0000 (06:32 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sun, 11 Jun 2006 06:32:45 +0000 (06:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/corefoundation/cfstring.cpp

index 078df1e308da30b4ccc9c1ffe0eaaa4dc91377b0..2661bb0af8580adaa6fe5c2eb7eb5b3a72ec5dc1 100644 (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 ;