X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/504f8052fd01fdc49848d29a5ade7b061f419b81..6954e0f6f3cc181609ac75507a6bb4ef0a3fa62a:/src/mac/corefoundation/cfstring.cpp diff --git a/src/mac/corefoundation/cfstring.cpp b/src/mac/corefoundation/cfstring.cpp index 9ac251a09f..003cedd9ad 100644 --- a/src/mac/corefoundation/cfstring.cpp +++ b/src/mac/corefoundation/cfstring.cpp @@ -613,8 +613,8 @@ wxCFStringRef::wxCFStringRef( const wxString &st , wxFontEncoding WXUNUSED_IN_UN size_t unicharlen = converter.WC2MB( NULL , str.wc_str() , 0 ) ; UniChar *unibuf = new UniChar[ unicharlen / sizeof(UniChar) + 1 ] ; converter.WC2MB( (char*)unibuf , str.wc_str() , unicharlen ) ; - m_cfs = CFStringCreateWithCharacters( kCFAllocatorDefault , - unibuf , unicharlen / sizeof(UniChar) ) ; + reset( CFStringCreateWithCharacters( kCFAllocatorDefault , + unibuf , unicharlen / sizeof(UniChar) ) ); delete[] unibuf ; #endif #else // not wxUSE_UNICODE