Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Commit

Permalink
avoid NPE if default TTS cannot be found (#2080)
Browse files Browse the repository at this point in the history
Signed-off-by: Kai Kreuzer <kai@openhab.org>
  • Loading branch information
kaikreuzer authored and maggu2810 committed Aug 30, 2016
1 parent ee285ec commit d97b95c
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -134,7 +134,9 @@ public void say(String text, String voiceId, String sinkId) {
Voice voice = null;
if (voiceId == null) {
tts = getTTS();
voice = getPreferredVoice(tts.getAvailableVoices());
if (tts != null) {
voice = getPreferredVoice(tts.getAvailableVoices());
}
} else if (voiceId.contains(":")) {
// it is a fully qualified unique id
String[] segments = voiceId.split(":");
Expand Down

0 comments on commit d97b95c

Please sign in to comment.