Skip to content

Commit

Permalink
Merge pull request #94923 from m4gr3d/fix_crash_on_android_terminate
Browse files Browse the repository at this point in the history
Fix crash that occurs on termination of the Godot engine on Android
  • Loading branch information
akien-mga committed Jul 30, 2024
2 parents fbcde49 + 30d63e8 commit 862d881
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions platform/android/java_godot_lib_jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 862d881

Please sign in to comment.