[Scummvm-git-logs] scummvm master -> 9a3e420bd20533e310e80058bcc63adebbfc0dfa

SupSuper supsuper at gmail.com
Wed Apr 29 14:23:09 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9a3e420bd2 TTS: Fix crash on Windows when there are no audio devices


Commit: 9a3e420bd20533e310e80058bcc63adebbfc0dfa
    https://github.com/scummvm/scummvm/commit/9a3e420bd20533e310e80058bcc63adebbfc0dfa
Author: SupSuper (supsuper at gmail.com)
Date: 2020-04-29T15:22:21+01:00

Commit Message:
TTS: Fix crash on Windows when there are no audio devices

Changed paths:
    backends/text-to-speech/windows/windows-text-to-speech.cpp


diff --git a/backends/text-to-speech/windows/windows-text-to-speech.cpp b/backends/text-to-speech/windows/windows-text-to-speech.cpp
index a398200bad..97f7777a74 100644
--- a/backends/text-to-speech/windows/windows-text-to-speech.cpp
+++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp
@@ -99,6 +99,8 @@ void WindowsTextToSpeechManager::init() {
 		return;
 	}
 
+	_speechState = NO_VOICE;
+
 #ifdef USE_TRANSLATION
 	setLanguage(TransMan.getCurrentLanguage());
 #else
@@ -450,6 +452,8 @@ Common::String WindowsTextToSpeechManager::lcidToLocale(Common::String lcid) {
 }
 
 void WindowsTextToSpeechManager::updateVoices() {
+	if (_speechState == BROKEN)
+		return;
 	_ttsState->_availableVoices.clear();
 	ISpObjectToken *cpVoiceToken = nullptr;
 	IEnumSpObjectTokens *cpEnum = nullptr;




More information about the Scummvm-git-logs mailing list