]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed crash if szLocale==NULL
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 24 Oct 2003 09:32:29 +0000 (09:32 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 24 Oct 2003 09:32:29 +0000 (09:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/intl.cpp

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