assert if wxLocale::Init called twice
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -520,6 +520,8 @@ private:
|
||||
|
||||
bool m_bConvertEncoding;
|
||||
|
||||
bool m_initialized;
|
||||
|
||||
static wxLanguageInfoArray *ms_languagesDB;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxLocale)
|
||||
|
@@ -1369,6 +1369,7 @@ wxLocale::wxLocale()
|
||||
m_pszOldLocale = NULL;
|
||||
m_pMsgCat = NULL;
|
||||
m_language = wxLANGUAGE_UNKNOWN;
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
// NB: this function has (desired) side effect of changing current locale
|
||||
@@ -1378,6 +1379,10 @@ bool wxLocale::Init(const wxChar *szName,
|
||||
bool bLoadDefault,
|
||||
bool bConvertEncoding)
|
||||
{
|
||||
wxASSERT_MSG( !m_initialized,
|
||||
_T("you can't call wxLocale::Init more than once") );
|
||||
|
||||
m_initialized = true;
|
||||
m_strLocale = szName;
|
||||
m_strShort = szShort;
|
||||
m_bConvertEncoding = bConvertEncoding;
|
||||
|
Reference in New Issue
Block a user