diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-07-30 12:29:10 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-07-30 12:29:10 +0200 |
commit | 862d88184320f51763c15e8abb1fea5a3c69e441 (patch) | |
tree | bc8c1d3c08815692f51c72815438adc602734c4c | |
parent | fbcde49cb6baaceda66856a7e91f0a8820d9630a (diff) | |
parent | 30d63e8ab90f8793868bf410370624fc9f789987 (diff) | |
download | redot-engine-862d88184320f51763c15e8abb1fea5a3c69e441.tar.gz |
Merge pull request #94923 from m4gr3d/fix_crash_on_android_terminate
Fix crash that occurs on termination of the Godot engine on Android
-rw-r--r-- | platform/android/java_godot_lib_jni.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/android/java_godot_lib_jni.cpp b/platform/android/java_godot_lib_jni.cpp index fec317ecb8..ec42e5bbd8 100644 --- a/platform/android/java_godot_lib_jni.cpp +++ b/platform/android/java_godot_lib_jni.cpp @@ -83,6 +83,10 @@ static Vector3 magnetometer; static Vector3 gyroscope; static void _terminate(JNIEnv *env, bool p_restart = false) { + if (step.get() == STEP_TERMINATED) { + return; + } + step.set(STEP_TERMINATED); // Ensure no further steps are attempted and no further events are sent // lets cleanup |