summaryrefslogtreecommitdiffstats
path: root/pico
diff options
context:
space:
mode:
authorBjorn Bringert <bringert@android.com>2011-04-19 13:14:17 +0100
committerBjorn Bringert <bringert@android.com>2011-04-19 13:14:17 +0100
commite246fccbaf595e39c647502fa76f996dee8f0711 (patch)
tree43d558ac20760a21388d099772224e41f50486b3 /pico
parent9ec0645e7801f0b306ac8a24b0e118e24abdf67e (diff)
downloadexternal_svox-e246fccbaf595e39c647502fa76f996dee8f0711.zip
external_svox-e246fccbaf595e39c647502fa76f996dee8f0711.tar.gz
external_svox-e246fccbaf595e39c647502fa76f996dee8f0711.tar.bz2
Clean JNI data pointer in shutdown()
Before, finalize() after shutdown() could segfault since shutdown() kept the pointer to the deleted SynthProxyJniStorage. Change-Id: I338c19758733425be2e3b0d9e66176d11d27e8f6
Diffstat (limited to 'pico')
-rwxr-xr-xpico/compat/src/com/android/tts/compat/SynthProxy.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/pico/compat/src/com/android/tts/compat/SynthProxy.java b/pico/compat/src/com/android/tts/compat/SynthProxy.java
index 68d0d92..58b2a50 100755
--- a/pico/compat/src/com/android/tts/compat/SynthProxy.java
+++ b/pico/compat/src/com/android/tts/compat/SynthProxy.java
@@ -139,8 +139,9 @@ public class SynthProxy {
/**
* Shuts down the native synthesizer.
*/
- public void shutdown() {
+ public void shutdown() {
native_shutdown(mJniData);
+ mJniData = 0;
}
@Override