X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5e3062291922189a215b81a0ae4fc4022ace597b..17d98558b35b75e3cad68d96841b4fa5a0c7e6ee:/src/common/translation.cpp diff --git a/src/common/translation.cpp b/src/common/translation.cpp index 71a16ca847..c6bb8440e0 100644 --- a/src/common/translation.cpp +++ b/src/common/translation.cpp @@ -1294,7 +1294,7 @@ void wxTranslations::SetLanguage(const wxString& lang) wxArrayString wxTranslations::GetAvailableTranslations(const wxString& domain) const { - wxCHECK_MSG( m_loader, false, "loader can't be NULL" ); + wxCHECK_MSG( m_loader, wxArrayString(), "loader can't be NULL" ); return m_loader->GetAvailableTranslations(domain); } @@ -1741,6 +1741,8 @@ wxArrayString wxFileTranslationsLoader::GetAvailableTranslations(const wxString& i != prefixes.end(); ++i ) { + if (i->length() == 0) + continue; wxDir dir; if ( !dir.Open(*i) ) continue; @@ -1839,7 +1841,7 @@ wxArrayString wxResourceTranslationsLoader::GetAvailableTranslations(const wxStr data.prefix.MakeLower(); // resource names are case insensitive if ( !EnumResourceNames(GetModule(), - GetResourceType(), + GetResourceType().t_str(), EnumTranslations, reinterpret_cast(&data)) ) {