wxStrdup(NULL) doesn't work

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2003-08-19 17:27:04 +00:00
parent 4b1f63604b
commit 62b78322e1
2 changed files with 9 additions and 1 deletions

View File

@@ -647,7 +647,9 @@ bool wxLocale::Init(const wxChar *szName,
// TODO: how to find languageId
// SetLocaleInfo(languageId, SORT_DEFAULT, localeName);
#else
m_pszOldLocale = wxStrdup(wxSetlocale(LC_ALL, szLocale));
m_pszOldLocale = wxSetlocale(LC_ALL, szLocale);
if ( m_pszOldLocale )
m_pszOldLocale = wxStrdup(m_pszOldLocale);
#endif
if ( m_pszOldLocale == NULL )