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