(probably) fixed wxLocale::Init with Borland C++

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2003-01-17 19:58:53 +00:00
parent e107213f89
commit b78a78f779

View File

@ -770,9 +770,13 @@ bool wxLocale::Init(int language, int flags)
return FALSE;
#endif
return Init(name, canonical, retloc,
(flags & wxLOCALE_LOAD_DEFAULT) != 0,
(flags & wxLOCALE_CONV_ENCODING) != 0);
wxChar *szLocale = retloc ? wxStrdup(retloc) : NULL;
bool ret = Init(name, canonical, retloc,
(flags & wxLOCALE_LOAD_DEFAULT) != 0,
(flags & wxLOCALE_CONV_ENCODING) != 0);
if (szLocale)
free(szLocale);
return ret;
}