void wxLocale::DoCommonInit()
{
m_pszOldLocale = NULL;
+ m_pOldLocale = NULL;
m_pMsgCat = NULL;
m_language = wxLANGUAGE_UNKNOWN;
m_initialized = false;
delete pTmpCat;
}
- // restore old locale
- wxSetLocale(m_pOldLocale);
+ // restore old locale if we had changed it
+ if ( m_pOldLocale )
+ wxSetLocale(m_pOldLocale);
+
// FIXME
#ifndef __WXWINCE__
wxSetlocale(LC_ALL, m_pszOldLocale);