Skip to content

Commit 862d881

Browse files
committed
Merge pull request #94923 from m4gr3d/fix_crash_on_android_terminate
Fix crash that occurs on termination of the Godot engine on Android
2 parents fbcde49 + 30d63e8 commit 862d881

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

platform/android/java_godot_lib_jni.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ static Vector3 magnetometer;
8383
static Vector3 gyroscope;
8484

8585
static void _terminate(JNIEnv *env, bool p_restart = false) {
86+
if (step.get() == STEP_TERMINATED) {
87+
return;
88+
}
89+
8690
step.set(STEP_TERMINATED); // Ensure no further steps are attempted and no further events are sent
8791

8892
// lets cleanup

0 commit comments

Comments
 (0)