mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-14 01:32:29 +00:00
jni: avoid crashing when run on ART
The ART runtime is stricter about calling env->DeleteWeakGlobalRef on an object/value that was not returned from env->NewWeakGlobalRef. In that case, it triggers an abort which causes the application to crash and display an "Application has stopped" dialog message.
This commit is contained in:
@@ -227,8 +227,6 @@ JNICALL Java_com_reecedunn_espeak_SpeechSynthesis_nativeDestroy(
|
||||
if (nat) {
|
||||
env->DeleteWeakGlobalRef(nat->object);
|
||||
delete nat;
|
||||
} else {
|
||||
env->DeleteWeakGlobalRef(object);
|
||||
}
|
||||
|
||||
return JNI_TRUE;
|
||||
|
||||
Reference in New Issue
Block a user