VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms/PreferencesDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main/Forms/PreferencesDialog.cpp')
-rw-r--r--src/Main/Forms/PreferencesDialog.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Main/Forms/PreferencesDialog.cpp b/src/Main/Forms/PreferencesDialog.cpp
index 90a668e6..c4d5140f 100644
--- a/src/Main/Forms/PreferencesDialog.cpp
+++ b/src/Main/Forms/PreferencesDialog.cpp
@@ -82,14 +82,16 @@ namespace VeraCrypt
LanguageListBox->Append("System default");
LanguageListBox->Append("English");
- size_t langCount;
- langCount = wxDir::GetAllFiles(languagesFolder.GetName(), &langArray, wxEmptyString, wxDIR_FILES);
- for (size_t i = 0; i < langCount; ++i) {
- wxFileName filename(langArray[i]);
- wxString langId = filename.GetName().AfterLast('.');
- wxString langNative = langEntries[langId];
- if (!langNative.empty()) {
- LanguageListBox->Append(langNative);
+ if (wxDir::Exists(languagesFolder.GetName())) {
+ size_t langCount;
+ langCount = wxDir::GetAllFiles(languagesFolder.GetName(), &langArray, wxEmptyString, wxDIR_FILES);
+ for (size_t i = 0; i < langCount; ++i) {
+ wxFileName filename(langArray[i]);
+ wxString langId = filename.GetName().AfterLast('.');
+ wxString langNative = langEntries[langId];
+ if (!langNative.empty()) {
+ LanguageListBox->Append(langNative);
+ }
}
}
#endif