diff options
-rwxr-xr-x | core/java/android/speech/tts/TextToSpeech.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java index 26c167e..841257f 100755 --- a/core/java/android/speech/tts/TextToSpeech.java +++ b/core/java/android/speech/tts/TextToSpeech.java @@ -1065,6 +1065,9 @@ public class TextToSpeech { if (!mStarted) { return result; } + if (loc == null) { + return result; + } try { String language = loc.getISO3Language(); String country = loc.getISO3Country(); |