fixed crash if szLocale==NULL

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@24283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2003-10-24 09:32:29 +00:00
parent 4250fef356
commit 06e92fcce1

View File

@@ -622,7 +622,7 @@ bool wxLocale::Init(const wxChar *szName,
if ( m_strShort.IsEmpty() ) { if ( m_strShort.IsEmpty() ) {
// FIXME I don't know how these 2 letter abbreviations are formed, // FIXME I don't know how these 2 letter abbreviations are formed,
// this wild guess is surely wrong // this wild guess is surely wrong
if ( szLocale[0] ) if ( szLocale && szLocale[0] )
{ {
m_strShort += (wxChar)wxTolower(szLocale[0]); m_strShort += (wxChar)wxTolower(szLocale[0]);
if ( szLocale[1] ) if ( szLocale[1] )