aboutsummaryrefslogtreecommitdiff
path: root/gui/options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/options.cpp')
-rw-r--r--gui/options.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index 3195694935..71f8cadd15 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1800,7 +1800,10 @@ void GlobalOptionsDialog::build() {
_ttsCheckbox->setState(false);
_ttsVoiceSelectionPopUp = new PopUpWidget(tab, "GlobalOptions_Accessibility.TTSVoiceSelection");
- Common::Array<Common::TTSVoice> voices = g_system->getTextToSpeechManager()->getVoicesArray();
+ Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
+ Common::Array<Common::TTSVoice> voices;
+ if (ttsMan != nullptr)
+ voices = ttsMan->getVoicesArray();
for(unsigned i = 0; i < voices.size(); i++) {
_ttsVoiceSelectionPopUp->appendEntry(voices[i].getDescription(), i);