diff options
author | Thanasis Antoniou | 2019-09-23 16:02:30 +0300 |
---|---|---|
committer | Thanasis Antoniou | 2019-09-23 16:02:30 +0300 |
commit | d39eca7e39f322b378845aba9ce7c09bc477987d (patch) | |
tree | d9a7e00a4d19ef8a51e0ca203a0235c67085b913 | |
parent | 6bbfe9e21d67b6c690b03a0c161c4e7b25dd3dbf (diff) | |
download | scummvm-rg350-d39eca7e39f322b378845aba9ce7c09bc477987d.tar.gz scummvm-rg350-d39eca7e39f322b378845aba9ce7c09bc477987d.tar.bz2 scummvm-rg350-d39eca7e39f322b378845aba9ce7c09bc477987d.zip |
ANDROID: Fix crash when exiting a game (Blade Runner)
-rw-r--r-- | backends/platform/android/android.cpp | 5 | ||||
-rw-r--r-- | backends/platform/android/jni.cpp | 1 | ||||
-rw-r--r-- | backends/platform/android/org/scummvm/scummvm/ScummVM.java | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp index a5dedb08eb..5614d0a95a 100644 --- a/backends/platform/android/android.cpp +++ b/backends/platform/android/android.cpp @@ -126,6 +126,11 @@ OSystem_Android::~OSystem_Android() { _timerManager = 0; deleteMutex(_event_queue_lock); + + delete _savefileManager; + _savefileManager = 0; + + ModularBackend::quit(); } void *OSystem_Android::timerThreadFunc(void *arg) { diff --git a/backends/platform/android/jni.cpp b/backends/platform/android/jni.cpp index 5e4c116c82..db91fc7726 100644 --- a/backends/platform/android/jni.cpp +++ b/backends/platform/android/jni.cpp @@ -562,6 +562,7 @@ void JNI::destroy(JNIEnv *env, jobject self) { delete _asset_archive; _asset_archive = 0; + _system->quit(); delete _system; g_system = 0; _system = 0; diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVM.java b/backends/platform/android/org/scummvm/scummvm/ScummVM.java index 2784623449..8dd974bbb8 100644 --- a/backends/platform/android/org/scummvm/scummvm/ScummVM.java +++ b/backends/platform/android/org/scummvm/scummvm/ScummVM.java @@ -141,11 +141,10 @@ public abstract class ScummVM implements SurfaceHolder.Callback, Runnable { int res = main(_args); - destroy(); - deinitEGL(); deinitAudio(); + destroy(); // On exit, tear everything down for a fresh restart next time. System.exit(res); } |