Fix a crash running the tests when running 'gradle connectedCheck' when the espeak application is not installed.

This commit is contained in:
Reece H. Dunn
2013-07-28 16:20:43 +01:00
parent 8406cd5e7a
commit 23005243da
+1 -1
View File
@@ -176,7 +176,7 @@ JNICALL Java_com_reecedunn_espeak_SpeechSynthesis_nativeGetSampleRate(
JNIEnv *env, jobject object) {
if (DEBUG) LOGV("%s", __FUNCTION__);
const native_data_t *nat = getNativeData(env, object);
return (jint) nat->sampleRate;
return (jint)(nat ? nat->sampleRate : 0);
}
JNIEXPORT jint