diff --git a/platform/android/java_godot_lib_jni.cpp b/platform/android/java_godot_lib_jni.cpp index fec317ecb88..ec42e5bbd8c 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