]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/intl.cpp
added support for leaving out <embedded objects> that are created during their parent...
[wxWidgets.git] / src / common / intl.cpp
index 1fd78f7aca0c3a6876952a91142790943ee463f0..9efed8b554eeeb09065f389104c0f77a7e27d8cf 100644 (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 )