diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/options.cpp | 4 | ||||
-rw-r--r-- | gui/widgets/popup.cpp | 2 |
2 files changed, 4 insertions, 2 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); diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp index 532127a422..2fce6e126f 100644 --- a/gui/widgets/popup.cpp +++ b/gui/widgets/popup.cpp @@ -213,7 +213,7 @@ void PopUpDialog::handleMouseMoved(int x, int y, int button) { // ...and update the selection accordingly setSelection(item); - if (_lastRead != item) { + if (_lastRead != item && _popUpBoss->_entries.size() > 0 && item != -1) { read(_popUpBoss->_entries[item].name); _lastRead = item; } |