fixed invalid memory read
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1418,9 +1418,11 @@ bool wxLocale::Init(const wxChar *szName,
|
|||||||
// TODO: how to find languageId
|
// TODO: how to find languageId
|
||||||
// SetLocaleInfo(languageId, SORT_DEFAULT, localeName);
|
// SetLocaleInfo(languageId, SORT_DEFAULT, localeName);
|
||||||
#else
|
#else
|
||||||
m_pszOldLocale = wxSetlocale(LC_ALL, szLocale);
|
wxMB2WXbuf oldLocale = wxSetlocale(LC_ALL, szLocale);
|
||||||
if ( m_pszOldLocale )
|
if ( oldLocale )
|
||||||
m_pszOldLocale = wxStrdup(m_pszOldLocale);
|
m_pszOldLocale = wxStrdup(oldLocale);
|
||||||
|
else
|
||||||
|
m_pszOldLocale = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( m_pszOldLocale == NULL )
|
if ( m_pszOldLocale == NULL )
|
||||||
|
Reference in New Issue
Block a user