Select Language dialog no longer complains if locale dir is missing.

Originally committed to SVN as r856.
This commit is contained in:
Niels Martin Hansen 2007-01-20 19:55:20 +00:00
parent ee8bf9274c
commit 99e47ae943

View file

@ -116,8 +116,9 @@ wxArrayInt AegisubLocale::GetAvailableLanguages() {
// Open directory
wxString folder = AegisubApp::folderName + _T("/locale/");
wxDir dir(folder);
if (!dir.IsOpened()) return final;
wxDir dir;
if (!dir.Exists(folder)) return final;
if (!dir.Open(folder)) return final;
// Enumerate folders
for (bool cont = dir.GetFirst(&temp1,_T(""),wxDIR_DIRS);cont;cont = dir.GetNext(&temp1)) {