aboutsummaryrefslogtreecommitdiff
path: root/gui/options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/options.cpp')
-rw-r--r--gui/options.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index b82bfc6440..507ae34176 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1808,8 +1808,10 @@ void GlobalOptionsDialog::build() {
for(unsigned i = 0; i < voices.size(); i++) {
_ttsVoiceSelectionPopUp->appendEntry(voices[i].getDescription(), i);
}
+ if (voices.size() == 0)
+ _ttsVoiceSelectionPopUp->appendEntry("None", 0);
- if (ConfMan.hasKey("tts_voice"))
+ if (ConfMan.hasKey("tts_voice") && (unsigned) ConfMan.getInt("tts_voice", _domain) < voices.size())
_ttsVoiceSelectionPopUp->setSelectedTag(ConfMan.getInt("tts_voice", _domain)) ;
else
_ttsVoiceSelectionPopUp->setSelectedTag(0);