modify m_encoding, not m_name, in wxCSConv::CreateConvIfNeeded() if we don't have either (as is the case with wxConvLocal); this fixes an infinite recursion in wxMac after the latest changes as wxLocale::GetSystemEncodingName() there returned empty (and not NULL) string which resulted in call to wxFontMapperBase::CharsetToEncoding() and reentrancy into wxConvLocal

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-03-18 21:12:20 +00:00
parent d2ea08b9e1
commit 02c7347b7f

View File

@@ -3505,7 +3505,7 @@ void wxCSConv::CreateConvIfNeeded() const
if ( !m_name && m_encoding == wxFONTENCODING_SYSTEM ) if ( !m_name && m_encoding == wxFONTENCODING_SYSTEM )
{ {
#if wxUSE_INTL #if wxUSE_INTL
self->m_name = wxStrdup(wxLocale::GetSystemEncodingName()); self->m_encoding = wxLocale::GetSystemEncoding();
#else #else
// fallback to some reasonable default: // fallback to some reasonable default:
self->m_encoding = wxFONTENCODING_ISO8859_1; self->m_encoding = wxFONTENCODING_ISO8859_1;