diff options
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/android/android.cpp | 2 | ||||
-rw-r--r-- | backends/platform/android/jni.cpp | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp index 5614d0a95a..7513639f94 100644 --- a/backends/platform/android/android.cpp +++ b/backends/platform/android/android.cpp @@ -129,8 +129,6 @@ OSystem_Android::~OSystem_Android() { 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..2c27838f6a 100644 --- a/backends/platform/android/jni.cpp +++ b/backends/platform/android/jni.cpp @@ -562,9 +562,13 @@ void JNI::destroy(JNIEnv *env, jobject self) { delete _asset_archive; _asset_archive = 0; - delete _system; + // _system is a pointer of OSystem_Android <--- ModularBackend <--- BaseBacked <--- Common::OSystem + // It's better to call destroy() rather than just delete here + // to avoid mutex issues if a Common::String is used after this point + _system->destroy(); + g_system = 0; - _system = 0; + _system = 0; sem_destroy(&pause_sem); |