|
@@ -277,8 +277,11 @@ public class SpeechUtil {
|
|
textToSpeech.shutdown();
|
|
textToSpeech.shutdown();
|
|
textToSpeech = null;
|
|
textToSpeech = null;
|
|
}
|
|
}
|
|
- speechThread.interrupt();
|
|
|
|
- speechThread = null;
|
|
|
|
|
|
+
|
|
|
|
+ if (speechThread != null) {
|
|
|
|
+ speechThread.interrupt();
|
|
|
|
+ speechThread = null;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
public void startSpeechThread() {
|
|
public void startSpeechThread() {
|